JoseRodriguez 6 Posted May 31, 2020 Hello, I'm making a mission which you switch units with a trigger. Trigger condition is fine, but issue is the activation. I want to have a phase, like, "fadeout > sleep for about 5 secs > switch unit > sleep for another 5 secs > fadein". Issue is, sleep doesn't work in triggers. Fadeout sequence starts but turns into fadein almost immediately with a bunch of "expression errors". //This is what I got inside Trigger "On Activation" [0, "BLACK", 5, 1] spawn BIS_fnc_fadeEffect; uiSleep 5; selectPlayer player2; uiSleep 10; [1, "BLACK", 5, 1] spawn BIS_fnc_fadeEffect; I'm not very found of external files or I don't really understand script languages. Is there a way to make it work with triggers? I remember these being easy before, I had a Steam post but looks like discussions were wiped and stuff changed since then. Share this post Link to post Share on other sites
wogz187 1085 Posted May 31, 2020 @JoseRodriguez, Try this, null=[]spawn { [0, "BLACK", 5, 1] spawn BIS_fnc_fadeEffect; uiSleep 5; selectPlayer player2; uiSleep 10; [1, "BLACK", 5, 1] spawn BIS_fnc_fadeEffect; }; Have Fun! 3 1 Share this post Link to post Share on other sites
JoseRodriguez 6 Posted May 31, 2020 Although I have no idea what actually null does, it just worked ! Thank you very much good sir. 2 Share this post Link to post Share on other sites
wogz187 1085 Posted May 31, 2020 @JoseRodriguez, Quote Although I have no idea what actually null does... In this case null is just the name of the process. Something like, you_fadeEffect=[] spawn... would work just as well. Anytime you need a sleepy script in the editor it has to be within a code-block, so, you_saySleep=[] spawn { sleep 1; systemChat "Sleep"; }; you_isAlive=[] spawn { waitUntil {sleep 1; alive player}; systemChat "Player is alive"; }; Have fun! 4 Share this post Link to post Share on other sites