UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

play ingame video(cutscene or Buyable Ending) to one player or all

broken avatar :(
Created 1 month ago
by AllMoDs
0 Members and 1 Guest are viewing this topic.
168 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 September 2015
Last active: 5 days ago
Posts
258
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Signature
×
AllMoDs's Groups
 just something i made for my mod i thot others can use
tested and works co-op on one player or all
 
video must be mkv with no sound
 
step 1
put video in usermaps\ YOUR MOD\zone\video
 
 
step 2
add to zone
Code Snippet
Plaintext
rawfile,zone/video/YOUR VID NAME.mkv

step 3
add this if not there to the top of the gsc your going to use
Code Snippet
Plaintext
#using scripts\shared\lui_shared;
step 4
add to your script where you want video to play
 
Code Snippet
Plaintext
self play_movie_with_timeout_one_player( "video name " ,video time, "sound to play");
NOTE if you want it to play on all players
example
Code Snippet
Plaintext
function play_to_all()
{
    players = getplayers();
    for(i = 0; i < players.size; i++)
    {   
        while( 1 )
        {       
            level waittill("?????");
            players[i] play_movie_with_timeout_one_player( "video name " ,video time, "sound to play");
            wait 0.05;
        }
    }
}
step 5
add to gsc
Code Snippet
Plaintext
function private play_movie_with_timeout_one_player( str_movie, timeout, sound )
{
    self endon("disconnect");
    b_hide_hud = true;
    self flagsys::set( "playing_movie_hide_hud" );
    self util::show_hud( 0 );   
    lui_menu = self OpenLUIMenu( "FullscreenMovie" );
    if(isDefined(lui_menu))
    {
        self SetLUIMenuData( lui_menu, "movieName", str_movie );
        self SetLUIMenuData( lui_menu, "movieKey", "" );
        self SetLUIMenuData( lui_menu, "showBlackScreen", false );
        self SetLUIMenuData( lui_menu, "looping", false );
        self SetLUIMenuData( lui_menu, "additive", 0 );
        wait .45;
        self playsoundtoplayer( sound, self );
        wait timeout;                         
        self CloseLUIMenu( lui_menu );
        self notify( "movie_done" );
        self flagsys::clear( "playing_movie_hide_hud" );
        self util::show_hud( 1 );
        self notify( "movie_done", "fullscreen" );
    }
}
and that is it will play video you put where "video name" is for the time you set where   video time   is and will stop on its own and sound you put "sound to play"
 
Last Edit: December 06, 2024, 05:28:13 am by AllMoDs
<31

 
Loading ...