10/14/2026 [01:07:25] GMT Home .:. Logout
Forums
Hardmaps.com :: Forums :: Map Making Forum :: Joint Operations
 
<< Previous thread | Next thread >>
Resetting an event
Moderators: Hardmaps Administrator, *HmS*Wedge, *HmS*grunt, *HmS*Trevor, *HmS*LongBow
Author Post
ChAoS KMHH
Tue Aug 12 2008
Registered Member #2174
Joined: Fri Jul 25 2008
Posts: 18
Oh well another question from me.

I want to have an helicopter that transports you after you spawn to the first mission area. I have managed to get the helicopter to start using events and an area trigger as sson as the first player spawns. then using another area trigger a 60 second delayed event starts to give players time to spawn and join the helicopter. It then takes off and lands at the desired place and you can get off. I have added consol messages via wac and these all work.

What i'm having trouble with is getting it to return and start over when another player (say a new player or a player with a headshot) needs to respawn at the start.

I have managed with a combination of event and wac to get it to land during a waypoint loop and let you off and after 20 seconds take off again (i used wac commands enable and disable to get the heli to stop at the required waypoint) and return but then it just hovers over the start waypoint.

I have tried using more area triggers to set things in motion and created a second waypint list and stopped both lists from looping and tried to redirect the heli to the new waypoint list back to the start.

What i'm trying to achieve is get it to return to the start and land and wait till another player or respawner boards and then set the initial event off again ?

I have looked around for the answer but just haven't found it yet. As always thanks for any help.

Back to top
MichaBen
Wed Aug 13 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
You can reset events in 2 ways: first of all using the Reset after x seconds field at the top, and secondly with the "Reset event x" event, which is triggered using another event.

In both ways, the event will be reset and if the conditions will be true again, the event is triggered again. So make an event with as conditions "Group 1 (the blue players) in area x (the number of the area trigger you set up)" AND "SSN x (helicopter ssn) in area x", the event will trigger when both helicopter and a player are in the area. Give it a delay of like 60 seconds and a reset timeout of 90 seconds. Then 30 seconds after it left, the event will reset. Because the helicopter isn't there any more (it left after 60 seconds) the event will not trigger until it's back. Once the helicopter is back, the second condition is true again and the event helicopter will leave when a player gets in the area (and with a 60 seconds delay).

With some wac scripting you can make this a bit more advanced, by checking if the people are actually aboard the heli rather then being in the area and making the heli wait shorter when everybody is in or maybe 5 more seconds if somebody is trying to board at the last second. But that is more advanced wac scripting, if you are interested maybe I can make some example scripts some time.

[ Edited Wed Aug 13 2008 ]
Back to top
ChAoS KMHH
Wed Aug 13 2008
Registered Member #2174
Joined: Fri Jul 25 2008
Posts: 18
Late last night while pulling what hair i have out I found the delay and reset check boxes in events.

I persevered till i got 2 events that reset one to the LZ (one set of way points) and one back again(another set of way points) using events. I have added some wac script to it but it only works the first time the heli is boarded so im currently looking into reseting wac scripts with the events.

Thank you again MichaBen.

Quick edit .....

Is there an easy way to reset a wac command so it triggers again when the event does ?

Thanks as always.

[ Edited Wed Aug 13 2008 ]
Back to top
MichaBen
Wed Aug 13 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
I don't think you can reset a wac event. But you can use variables for that. For example, when you want a text message to appear, inside the MED event set mission variable 50 to 1. Then with the following wac code:

if v50 == 1 then
text "Hello World"
v50 = 0
endif

By using a variable to trigger a text message, you can simpyl set the variable back to 0 to mark the event as done. But the next time v50 will be set to 1, the wac code will be triggered again, and again it will reset the value to 0. So the message will appear each time you set mission variable 50 to 1, no matter how many times you have done it already.
Back to top
ChAoS KMHH
Thu Aug 14 2008
Registered Member #2174
Joined: Fri Jul 25 2008
Posts: 18
Thank you MichaBen yet again.

I did what you said and got it working. I also made another variable for the LZ which is a different event and that worked also. But for some strange reason the pilot as started to get out the drivers seat after the second time he lands at the LZ.

I have an area triggered event that started by both chopper and player being in the area. This is on a 40 second delay and is reset after 60 seconds and it sends the chopper on its first set of way points. When i added the variable to the first event it went off after the delay of course and it needed to be before that so I have another event that is triggered the same as the first event that sets off the variable. This as no delay and a 60 second reset.

When the chopper lands at the LZ i have another area triggered event by the chopper and player again that starts the return. This is on a 20 second delay and also resets after 60 seconds. I did the same as before with a second event for the return and changed the main variable number. This worked also but then the pilot started getting out the seat after returning for the second time to the LZ and the second return flight does not get triggered.

I'll keep trying till i get it right tho because i feel im so close. Again thanks for all your help.

Ahh i think i sussed it. It seems that if a player went into the area at the LZ after the chopper had returned and after the 60 second reset it confused it and caused the pilot to stop flying so i raised the area trigger at the LZ above head height and it seems to have solved it. As for the variables there a great tool and i have them doing all sorts now.

[ Edited Fri Aug 15 2008 ]
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.0661 sec, 0.0112 of that for queries.