Modme Forums

How To Do Screen Fades!

Game Modding | Call of Duty: Black Ops 3 | Scripting


tmk_boi:

Im pretty sure there are alot of other ways to do this
this is an updated version of my method by Spiki lol because my original was crap!


#using scripts\shared\lui_shared;

thread fade_all_players();


function fade_all_players()
{
foreach(player in GetPlayers())
player thread fade_player();
}

function fade_player()
{
self thread lui::screen_fade_out(1);
wait 3;
self thread zm::screen_fade_in(2)
}



There You Go!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Spiki:

Im pretty sure there are alot of other ways to do this

so for this example ill make it fade out for whe nthe round ends and fade back in when the round starts


thread Bruh();


function Bruh()
{
//ScreenFadeOut
foreach(player in GetPlayers())
{
player thread lui::screen_fade_out(1);
wait 3;
player thread zm::screen_fade_in(2);
}
}


There You Go!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


This will fade each player 3 seconds after the previous one


tmk_boi:

sorry could you put this in more specific details? i dont fully understand it lol


Spiki:

sorry could you put this in more specific details? i dont fully understand it lol

theres a wait in each loop. you might aswell just do

player1 thread lui::screen_fade_out(1);
wait 3;
player1 thread zm::screen_fade_in(2);

player2 thread lui::screen_fade_out(1);
wait 3;
player2 thread zm::screen_fade_in(2);

player3 thread lui::screen_fade_out(1);
wait 3;
player3 thread zm::screen_fade_in(2);

...

player 2 waits 3 secs, player 3 waits 6 secs, player 4 waits 9 secs for the fade
foreach doesnt run each player parallel, its like a for() loop


tmk_boi:

theres a wait in each loop. you might aswell just do

player1 thread lui::screen_fade_out(1);
wait 3;
player1 thread zm::screen_fade_in(2);

player2 thread lui::screen_fade_out(1);
wait 3;
player2 thread zm::screen_fade_in(2);

player3 thread lui::screen_fade_out(1);
wait 3;
player3 thread zm::screen_fade_in(2);

...

player 2 waits 3 secs, player 3 waits 6 secs, player 4 waits 9 secs for the fade
foreach doesnt run each player parallel, its like a for() loop

oooooh ok thanks, do i have permission to post what you wrote instead of the original?


Spiki:

oooooh ok thanks, do i have permission to post what you wrote instead of the original?

why in tf would you do that its worse than the original.

Post this ffs
function fade_all_players()
{
foreach(player in GetPlayers())
    player thread fade_player();
}

function fade_player()
{
self thread lui::screen_fade_out(1);
wait 3;
self thread zm::screen_fade_in(2)
}


tmk_boi:

why in tf would you do that its worse than the original.

Post this ffs
function fade_all_players()
{
foreach(player in GetPlayers())
    player thread fade_player();
}

function fade_player()
{
self thread lui::screen_fade_out(1);
wait 3;
self thread zm::screen_fade_in(2)
}

lol idk much because i only just came back to mod tools after quitting for a year


tmk_boi:

lol idk much because i only just came back to mod tools after quitting for a year

but thanks :)