Jump to content
Sign in to follow this  

Recommended Posts

I have searched in these forums and in OFPEC Forums and cannot find anything on how to check time.

Im trying to create a trigger and in the condition field would be the time check if it is dark outside.

Then it would activate the searchlights. There will be no AI in the search lights and I will be activating with:

player Action ["lightOn", light3]

Any help would be appreciated.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Can you be more specific?

; assumme it is 16:30
_daytime = daytime

1825 = daytime

Edited by cobra4v320

Share this post


Link to post
Share on other sites

That sounds pretty tough. I tried before to make a timer and then link a helicopter extraction to a specific time while having a timer displayed for all players that counted down till the heli came but I couldn't get it to work.

Share this post


Link to post
Share on other sites

Maybe something like this:

Cond: daytime > 18.15

On Act: light3 action ["lightOn", light3]

However, I think the searchlights won't work without a man in them.

Share this post


Link to post
Share on other sites

Searchlights will work without a man in them, and I finally figured it out:

Condition field

(daytime > 19.75 || daytime < 4.25)

19.75 is the time on 4.25 is the time off.

On Activation Field

player action ["lightOn", nameofyourlight]

On Deactivation

player action ["lightOff", nameofyourlight]

Set the trigger to repeatedly.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Will this work with a waypoint & trigger ? Im trying to get an officer to leave a hotel and drive to a house, but only at a certain time :p

Share this post


Link to post
Share on other sites

Is there any way of changing day to night from within the game? Just curious, be a good addition to training maps :)

Share this post


Link to post
Share on other sites
Searchlights will work without a man in them, and I finally figured it out:

Condition field

(daytime > 19.75 || daytime < 4.25)

19.75 is the time on 4.25 is the time off.

On Activation Field

player action ["lightOn", nameofyourlight]

On Deactivation

player action ["lightOff", nameofyourlight]

Set the trigger to repeatedly.

I have the feeling that those timings will change depending on time of year and map latitude.

Share this post


Link to post
Share on other sites

@Fenrir

condition field

daytime > yourtime here

on activation

your move script here

move script

wp1 = Groupofficer addwaypoint [getmarkerpos "start", 0];
wp1 setwaypointtype "MOVE";
wp1 setWaypointSpeed "normal";

Something like above should work for you.

@DMarkwick

Come on man lets not over complicate things, you change the times to your needs.

---------- Post added at 09:19 PM ---------- Previous post was at 09:09 PM ----------

Another option would be using a trigger:

OPFOR detected by BLUFOR

on activation

player action ["lightOn", nameofyourlight]

on deactivation

player action ["lightOff", nameofyourlight]

Not tested.

Edited by cobra4v320

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  

×