Home   Help Search Login Register  

Author Topic: Time to light fire  (Read 1145 times)

0 Members and 1 Guest are viewing this topic.

Offline nimierkki

  • Members
  • *
Time to light fire
« 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??

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Time to light fire
« Reply #1 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.