DFBarracks - Forums




Delta Force Barracks Forums - Powered by XMB 1.9.11
Delta Force Barracks Forums
Not logged in [Login ]
Go To Bottom

Printable Version  
Author: Subject: How to reset event in WAC file?
sgt roc
Private
**




Posts: 35
Registered: 10-14-2003
Location: costa mesa , california
Member Is Offline


[*] posted on 11-23-2007 at 08:39 AM
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





View user's profile View All Posts By User This user has MSN Messenger
Legionnaire=M=
Private
**


Avatar


Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline


[*] posted on 11-23-2007 at 11:37 AM


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.
View user's profile View All Posts By User
Legionnaire=M=
Private
**


Avatar


Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline


[*] posted on 11-23-2007 at 01:01 PM


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.
View user's profile View All Posts By User
Jonathan
Captain
****




Posts: 295
Registered: 5-4-2003
Member Is Offline


[*] posted on 11-28-2007 at 01:03 PM


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?

View user's profile View All Posts By User
Legionnaire=M=
Private
**


Avatar


Posts: 89
Registered: 5-11-2004
Location: Yokosuka, JAPAN
Member Is Offline


[*] posted on 11-29-2007 at 09:27 AM


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
View user's profile View All Posts By User

  Go To Top

Powered by XMB 1.9.11
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 15] [PHP: 53.9% - SQL: 46.1%]












Copyright © 2002 - 2008 All Rights Reserved - DFBarracks.com
Site Design by A.Bullet - ScreamingDemon.com