OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: nimierkki on 16 Jul 2006, 13:42:48

Title: Time to light fire
Post by: nimierkki on 16 Jul 2006, 13:42:48
how i get fires lighed when the time is right. Like 6 pm to 1am and 3am to 7am????
i'm using the time parmetrer ta the start....

Code: [Select]
titleParam1 = "Time of Day";
valuesParam1[] = {5,12,18.3,0};
defValueParam1 = 5;
textsParam1[] = {"First Light","Midday","Last Light","Night"};

so hov i get the fires lighet on the ringt time??
Title: Re: Time to light fire
Post by: myke13021 on 16 Jul 2006, 19:24:05
[(fire1, fire2, fire3),6, 19] exec "fireon.sqs"

Code: [Select]
; fireon.sqs

_firearray = _this select 0
_sunset = _this select 1
_sundown = _this select 2

_timeofday = daytime

? (_timeofday <= _sunset) OR (_timeofday >= _sundown): "_x inflame true" foreach _firearray
exit

untested and not sure about the correct daytime format, but i guess you see the way.