Home   Help Search Login Register  

Author Topic: Event Triggers  (Read 2620 times)

0 Members and 1 Guest are viewing this topic.

Offline 999chris

  • Members
  • *
  • I'm a llama!
Event Triggers
« 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?
« Last Edit: 27 Mar 2011, 03:50:48 by 999chris »

Offline 999chris

  • Members
  • *
  • I'm a llama!
Re: Event Triggers
« Reply #1 on: 30 Mar 2011, 21:01:52 »
sorted it.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Event Triggers
« Reply #2 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.
"When 900 years YOU reach, look as good you will not!"

Offline 999chris

  • Members
  • *
  • I'm a llama!
Re: Event Triggers
« Reply #3 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.
« Last Edit: 30 Mar 2011, 23:47:20 by 999chris »