sgt roc
Private

Posts: 35
Registered: 10-14-2003
Location: costa mesa , california
Member Is Offline
|
|
How to reset event in WAC file?
I would like to be able to have wac file play a .wav whenever blue team enters in it. my text right now is:
if ssnarea(10000. 1) and never() then
wave("xxxxx.wav")
endif
I have tried creating event in MED:
event 0
group / area trigger
blue team/ area 1
and resetting event in 5 seconds.
I hoped wac would read med editor and play .wav file next time I moved into area 1.
I deleted and never from the wac commands and of course it keeps playing.
can you help me. thanks, roc of coopvets
|
|
|
Legionnaire=M=
Private

Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline
|
|
I think there are 2 methods for your desire event action.
1 method is by mixture of MED & .wac event.
Another method is only by .wac script.
I post both ideas as samples.
Method - A : Mixture of MED event & .wac. | Code: | - MED event ;
[If Group 1 is into Area 1, Mis-Var#1 is set to 1 per 5 sec.]
Event 0: Event 0
Reset after 5 seconds
Triggers:
Group 1 is within area 1
Actions:
Set Mission Var#1 to 1
- .wac ;
[If Mis Var#1 is equal to 1, .wav will be played & Mis Var#1 will be reset to 0.]
if eq(V1, 1) then
wave("xxxxx.wav", 100)
set(V1, 0)
endif |
Method - B : Only by 2 .wac events. This is without MED event. | Code: |
if false(V1) and elapse(5) then
PLOOP
if ssnarea(player, 1) then
set(V1, 1)
endif
END
endif
if eq(V1, 1) then
wave("xxxxx.wav", 100)
set(V1, 0)
endif
;// If 1 or more human player be into Area 1, xxxxx.wav file will be played per 5 counts (means approx. 5 sec.). |
Please try which one as your prefer. =)~~~
xxxxx.wav won't be played if nobody be into Area 1.
|
|
|
Legionnaire=M=
Private

Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline
|
|
Also, I post another idea as an advanced.
This makes playing dialogue .wav from the mouth of 1 player who is into Area 1.
Little modify the method - B. This is by only .wac events.
Method - C : Advanced. .wav will be heard from the mouth of 1 player who is into Area 1.
| Code: | if elapse(5) then
PLOOP
if false(V1) and ssnarea(player, 1) then
set(V1, player)
endif
END
endif
if true(V1) then
SSNwave(V1, "xxxxx.wav", 150)
set(V1, 0)
endif
;// If 1 or more human player be into Area 1, xxxxx.wav file will be
played from someone be in Area 1 per approx. 5 sec. |
|
|
|
Jonathan
Captain
  
Posts: 295
Registered: 5-4-2003
Member Is Offline
|
|
Legionnaire=M=, how does the PLOOP work in the WAC? Is it similar to a LOOP in regular coding; that is it loops until the question has been
answered?
|
|
|
Legionnaire=M=
Private

Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline
|
|
Yep, it is looping for checking human players as you say; 'is there someone under "IF trigger" or not?'
I'm not familiar with it yet.
Please check this topic.
http://www.dfbarracks.com/forums/viewthread.php?tid=42484
|
|
|