Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
themanthatcan

Condition of Presence

Recommended Posts

I'm designing a mission which is set either at night or during the day. (only two options). Now in the night a want fewer units than in the day time. So im after abit of help.

So i have a group, there are 5 soldiers in total. And i only want the squad leader to patrol at night. So how would i go about doing this.

I have looked into using the Condition of Presence part of the units and seeing if that works, but it doesn't. I've used it before on a mission, where if you selected easy it didn't spawn a lot of the soldiers. But i dont know the variable for night and day ?

can anyone help

Thanks in advance

Share this post


Link to post
Share on other sites

dayTime < 5 || dayTime > 20

You can play with the values if 5:00 AM to 8:00 PM isn't good enough.

Share this post


Link to post
Share on other sites

I've added that line of text to the soldiers condition of presence, and nothing happens. He isn't there when it's night time or day time. Am i doing something wrong ?

Share this post


Link to post
Share on other sites

The night or day options is that a parameter? If, how do you change the time? With skipTime?

Share this post


Link to post
Share on other sites

Doesn't Condition of Presence only work at the time the unit is created.

When I test the above code it works fine but only at the start of the mission, time changes after that have no effect on the unit.

Share this post


Link to post
Share on other sites
I've added that line of text to the soldiers condition of presence, and nothing happens. He isn't there when it's night time or day time. Am i doing something wrong ?

Well how are you setting the time of day? With skipTime? If so, you need to be aware that the condition of presence fields are evaulated before the init fields and init.sqf. I'm guessing you're using a mission param for setting the time. If that's the case, you have to check that variable instead of dayTime, since the skipTime wouldn't have taken effect yet when the conditon is checked.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×