10/13/2026 [20:59:39] GMT Home .:. Logout
Forums
Hardmaps.com :: Forums :: Map Making Forum :: Hints, Tips and trouble shooting
 
<< Previous thread | Next thread >>
a wac file question on area triggers:
Moderators: Hardmaps Administrator, *HmS*Wedge, *HmS*grunt, *HmS*Trevor, *HmS*LongBow
Author Post
Roc
Sat Nov 24 2007
Registered Member #1914
Joined: Fri Nov 16 2007
Posts: 4
I would like to be able to set area trigger in DFMED to control event. Then use event in the .WAC file to play .wav. It works fine but only 1 time. I want the area trigger to play .wav every time a blue player enters it or other ones. I know its been done. Rabid Chipmunk did it and I have his wac to read. But Im not good enough to understand the variables he used(I think). Is there anyone that can help me with this problem. Thank you
Back to top
*HmS*Trevor
Sat Nov 24 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
In xmed use an event with your area trigger to set a variable (eg.v99,10), have this set to reset every 20 seconds.

In the wac if eq(v99,1) then
wave(*****)
set(v99,0)
endif

You can do the trigger from wac also, but this fires every second so use it carefully.

PLOOP
if ssnarea(player,6) then // player in area 6 as defined in xmed
ssnwave(player,"loktone.wav",25)
consol("some text !!")
set(v99,1)
endif
end

In the wac if eq(v99,1) then
wave(*****)
set(v99,0)
endif
Back to top
Roc
Sat Nov 24 2007
Registered Member #1914
Joined: Fri Nov 16 2007
Posts: 4
excuuuuuuuuuuuuuuuuuse meeeeeeeeeee!

jeez that was fast. Thank you I will try to articulate that.
never used the xmed to set variables. But 1st time for everything, right? Will let u know outcome.
Back to top
Roc
Sat Nov 24 2007
Registered Member #1914
Joined: Fri Nov 16 2007
Posts: 4
It didnt work, what I got was a loop that fires when I enter the area and continues to repeat about 1-2 secs. Is that what you meant? So here is what I did.

Editor:

Event 3

if
group 1 within area 4

then
change mission variable
set variable
99
10

in the wac:

instead of if event (03) and never() then

it now reads if eq(v99,1) then
wave("chip_025.wav")
set(99,0)v
endif

I noticed that in first line you wrote in editor v99,10
then in wac (99,0)v is that correct.

2. what does the 99 represent and could it be 79 or 30
3.will I need one of these for every trigger i want to activate.
4. will they all be 99,1
I hope this is enough infor for you. And I am really sorry I didnt understand enough to get it the 1st time. I have just enough knowledge to be dangerous. lol
Back to top
Roc
Sun Nov 25 2007
Registered Member #1914
Joined: Fri Nov 16 2007
Posts: 4
what happened to my reply
Back to top
*HmS*Trevor
Sun Nov 25 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
Ooops typo in my scritp
In xmed use an event with your area trigger to set a variable (eg.v99,10), have this set to reset every 20 seconds.

In the wac
if eq(v99,10) then
wave(*****)
set(v99,0)
endif


Basically you use xmed to set a variable, it can be any number, then the wac reads that variable, once it has performed the required action I reset the variable to 0 ready to be reset, you tick the box in events in xmed to reset and type the delay.

[ Edited Sun Nov 25 2007 ]
Back to top
NUT ACE
Sun Nov 25 2007
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
*HmS*Trevor wrote ...

it can be any number,


True, but the max nr is 256....Or was it from 0 to 255...hmmm not sure

NUT ACE out...
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
All trademarks are copyright their respective owners.
This site is best viewed using 1280-1024 screen resolution.
{THEMEDISCLAIMER}
Render time: 0.1099 sec, 0.0236 of that for queries.