mr tarzan
Private

Posts: 93
Registered: 6-24-2005
Location: Norway
Member Is Offline
Mood: Happy
|
|
Time delay in a WAC event
Yo
How do I add time delay to this wac event?
if groupdead(4) and never() then
wave("alarm9.wav", 10)
consol("Destroy Chemical Containers at Charlie")
endif
mr tarzan :o
|
|
|
General Electric***
Corporal
 
Posts: 155
Registered: 7-9-2005
Member Is Offline
Mood: generous
|
|
| Quote: | Originally posted by mr tarzan
Yo
How do I add time delay to this wac event?
if groupdead(4) and never() then
wave("alarm9.wav", 10)
consol("Destroy Chemical Containers at Charlie")
endif
mr tarzan :o |
one simple way :
if groupdead(4) and never() then
wave("alarm9.wav", 10)
endif
if chain(timedelay) then
consol("Destroy Chemical Containers at Charlie")
endif
I am not sure maby u can even cut out the wave event from above and it will work if not just put in some irrelevant command and move the wave to the
chain event as well.
There are other ways which are more sophisticated but I dont think you will need them or they add something important to it.
|
|
|
chrislew200
Field Marshall
     
Posts: 3368
Registered: 3-30-2003
Member Is Offline
Mood: ~RSU~ Is Home
|
|
try it like this:
if groupdead(4) and elapse(4) and never() then
wave("alarm9.wav", 10)
endif
No Longer Present
|
|
|
mr tarzan
Private

Posts: 93
Registered: 6-24-2005
Location: Norway
Member Is Offline
Mood: Happy
|
|
thx, will try
mr tarzan
|
|
|
mr tarzan
Private

Posts: 93
Registered: 6-24-2005
Location: Norway
Member Is Offline
Mood: Happy
|
|
thx for response.
I wasn't clear about when or where I wanted the time delay. I wanted the time delay after groupdead, and then alarm to sound and text to display at
the same time. However, this works;
if groupdead(4) and elapse(5) and never() then
wave("alarm9.wav", 10)
consol("Destroy Chemical Containers at Charlie")
endif
Both alarm and (consol) text appears after 5 sec.
mr tarzan
|
|
|
General Electric***
Corporal
 
Posts: 155
Registered: 7-9-2005
Member Is Offline
Mood: generous
|
|
| Quote: | Originally posted by mr tarzan
thx for response.
I wasn't clear about when or where I wanted the time delay. I wanted the time delay after groupdead, and then alarm to sound and text to display at
the same time. However, this works;
if groupdead(4) and elapse(5) and never() then
wave("alarm9.wav", 10)
consol("Destroy Chemical Containers at Charlie")
endif
Both alarm and (consol) text appears after 5 sec.
mr tarzan
|
thats quite handy :-)
just one thing about elapse() :
remember this one is executed on a fixed schedule. So every 5 seconds from the beginning of the game is what is the reference. Now it may happen that
your groupdead trigger is activated just in a 5 second period, where 5 seconds just have elapsed. then the event will be triggered without delay. same
goes when the 5s elapse period has counted up to 2 or 3 seconds. the event will then be triggered 3 or 2 seconds after groupdead. elapse does not
refer to the other triggers in an event it runs independently.
|
|
|
mr tarzan
Private

Posts: 93
Registered: 6-24-2005
Location: Norway
Member Is Offline
Mood: Happy
|
|
thx dude, nice to know
mr tarzan
|
|
|