Jump to content
Sign in to follow this  
HeroesandvillainsOS

Trigger Sleep on mission start

Recommended Posts

Hi everyone. Sorry for the noob question but I'm looking to put a delay on the start of an end game trigger. The trigger is used as a failsafe to end a long term ALiVE persistent mission on a dedicated server, set to activate if no enemies are alive on the map. The problem I'm having is the trigger is firing before the mission has fully initialized, and before enemies actually spawn, causing the mission to "end" on mission start.

 

Reading around the internet, my understanding is sleep can't be executed on a trigger? Sorry if that's wrong. Am I supposed to use countdown? The wiki isn't exactly clear to me on this because it talks about conditions being met to start the trigger and I'm not sure what that means.

 

Ideally I'd like the trigger to fire 2 minutes after mission start (so maybe all I need to do is put 120/120/120 in the countdown section?)? And it needs to be dedicated server compatible across clients if that makes a difference.

 

Here's the trigger. It covers the entire map. I set it to be activated by anybody and only to fire once:

 

condition: if (isServer) then {count ([getposATL thisTrigger, 15000, ["EAST","entity"]] call ALIVE_fnc_getNearProfiles) == 0 && {count ([getposATL thisTrigger, 15000, ["EAST","vehicle"]] call ALIVE_fnc_getNearProfiles) == 0}} else {false};

 

Activation: if (isServer) then { ["end1","BIS_fnc_endMission",true,true] call BIS_fnc_MP};

 

Any help would be appreciated.

 

 

 

 

Share this post


Link to post
Share on other sites
//trigger server only box selected
//repeatable false
//detection NONE

//condition
!isNil "ALIVE_profileSystemInit" && 
{([getposATL thisTrigger, 15000, ["EAST","entity"]] call ALIVE_fnc_getNearProfiles) isEqualTo [] ||
{([getposATL thisTrigger, 15000, ["EAST","vehicle"]] call ALIVE_fnc_getNearProfiles) isEqualTo []}}

 
//onactivation
"EveryoneWon" call BIS_fnc_endMissionServer 

try this maybe it will work for you

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×