OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: 999chris on 26 Mar 2011, 17:17:43

Title: Event Triggers
Post by: 999chris on 26 Mar 2011, 17:17:43
Hi, Im trying to use Event Handlers, "LandedStopped" and "LandedTouchDown" in particular. However what I've tried so far causes them so fire on initation, as well as any other point I "add" them to the vehicle "C-130".

What am I doing wrong?
Title: Re: Event Triggers
Post by: 999chris on 30 Mar 2011, 21:01:52
sorted it.
Title: Re: Event Triggers
Post by: Wolfrug on 30 Mar 2011, 22:14:35
How did you fix it? :) If it's a general bug, I think it'd be a good thing for everyone to get an idea of your solution. I was going to try it, but got sort of stuck for time, so please let us know!

Wolfrug out.
Title: Re: Event Triggers
Post by: 999chris on 30 Mar 2011, 23:08:34
No, not a bug per se.

Just not realising I had to put the command in specific curly brackets, (What do you call this?) :)

i.e:
Code: [Select]
veh addEventHandler ["LandedStopped",{grp1 exec "landed.sqs"}]
I was trying things like

Code: [Select]
veh addEventHandler ["LandedStopped",grp1 exec "landed.sqs"]
and

Code: [Select]
veh addEventHandler ["LandedStopped",hint "LANDED"]
Which, for some reason executed the code in the 2nd part of the handler on intialization, which is what I found odd.