Quote:
Originally Posted by HomeSkool
That is awesome! I'll test it when I get home later today.
One more thought. Is the 24 hour clock a variable?
1. I could make a guy walk down the street and go stand guard at 0800
2. Have him stay at his point until 1700 then he could "go home"
3. Then because the day timer resets at 0800 the next day he "goes back to work"
I thought this would be awesome because I could make the town I am building automated. People go to work then go home. Have a helicopter fly a route then park for the night and
do it all over again.
This said I also have not figured out how to make it cycle from day to night.
This this possible?
|
Yes you can.
You can set the mission start time in the editor or set it in the WAC.
You must keep in mind that the time of day settings will immediately change the actual time of day in-game.
So the sun could disappear and it could suddenly be the middle of the night.
//sets the TOD to 8:00AM
//tod 08:00
//If the current TOD is 5:00PM
//if eq curTOD,17:00
-----------------------------------------------------------------------------------------
//so for Q.1 Q.2 and Q.3...
if never then
set v1
endif
if eq curTOD,08:00 then
set v1,1
endif
if eq v1,1 then
ssntoWP 1,1
endif
if eq curTOD,17:00 then
set v1,2
endif
if eq v1,2 then
ssntoWP 1,2
endif
-----------------------------------------------------------------------------------------
// Some basic controls relevant to your needs
if past(#) // time since player actually enters the game
if ontick(#) // time since game actually starts
if chain(#) // fires seconds after previous trigger
if previous() // same as chain but imediately after previous trigger
if elapse(#) // time elapsed from if or previous
-----------------------------------------------------------------------------------------
true
false
else
elseif
not
eq
ne
-----------------------------------------------------------------------------------------
loop
end
-----------------------------------------------------------------------------------------
ploop
end
-----------------------------------------------------------------------------------------
dornd
enddo
-----------------------------------------------------------------------------------------
// Using chain and var
-----------------------------------------------------------------------------------------
if ssnarea player,1 then
set v1,1
endif
if eq v1,1 and never then
text "You have 1:00 minute left"
wave "yourwave60.wav"
endif
if chain 30 and never then
text "You have 30 seconds left"
wave "yourwave30.wav"
endif
if chain 15 and never then
text "You have 15 seconds left"
wave "yourwave15.wav"
endif
if chain 10 and never then
text "You have 5 seconds left"
wave "yourwave5.wav"
endif
//etc...
-----------------------------------------------------------------------------------------
//You can set a countdown timer by way of the following- Thanks to info provided by Dave61
-----------------------------------------------------------------------------------------
// IN-GAME COUNTER
// These scripts create an in-game counter during game play.
// (This script was created by GENERAL ELECTRIC at NOVAWORLD FORUM)
// A.) counter that counts the seconds into the game:
if never then
set(v60,0) ; s into game
set(v70,0) ; helpvar s
set(v80,0) ; m into game
set(v90,30) ; cd m Minutes for countdown
set(v100,59) ; cd s
endif
if elapse(1) then
inc(v60)
inc(v70)
dec(v100)
endif
// B.) converting seconds into minutes
if eq(v70,60) or eq(v60,1) and ne(v90,0) then // (stompem - you can also use: and not eq v90,0)
inc(v80)
set(v70,0)
dec(v90)
set(v100,59)
endif
// C.) Making a countdown
if elapse(2) then
consol#("Minutes left",v90)
consol#("Seconds left",v100)
consol("Countdown")
endif
// D.) making a timer instead of countdown
if elapse(3) then
consol#("Minutes played",v80)
consol#("Seconds played",v70)
consol("Gametimecounter")
endif
// E.) trigger for countdown
if eq(v90,0) and eq(v100,0) and never then
text("Countdown finished")
endif
-----------------------------------------------------------------------------------------