Home   Help Search Login Register  

Author Topic: A time for "addeventhandler" has come!?  (Read 526 times)

0 Members and 1 Guest are viewing this topic.

Bart

  • Guest
A time for "addeventhandler" has come!?
« on: 16 Oct 2004, 22:25:03 »
Ok guys, now that we know what kinds of "actions" we have in OFP, why won't we try to find "addeventhandler" codes and post 'em here?  :D

I do know 2 addeventhandler codes:

this addEventhandler ["KILLED", this exec "script.sqs"]
this addEventhandler ["FIRED", this globalchat "eat that!"]

let's try to find more?!  ;D

greetz


Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:A time for "addeventhandler" has come!?
« Reply #1 on: 16 Oct 2004, 22:42:08 »
All the available eventhandlers are listed in the Command Reference......these are:

Code: [Select]
"Killed" object : killer

"Hit" object : causedBy, scalar : howMuch

"Engine" bool : engineState
 
"GetIn" string : position (1), object : unit

"GetOut" string : position (1), object : unit

"Fired" string : weapon, string : muzzle, string mode, string : ammo

"IncomingMissile" string : ammo, object : whoFired

"Dammaged" string : selectionName, scalar : howMuch

"Gear" bool : gearState

"Fuel" bool : fuelState
   
"Init" No arguments.



Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A time for "addeventhandler" has come!?
« Reply #2 on: 16 Oct 2004, 23:35:56 »
If you use the forum search function you will find many threads discussing how best to use them.    There was a good one on the troublesome "dammaged" EH the other week.
Plenty of reviewed ArmA missions for you to play

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:A time for "addeventhandler" has come!?
« Reply #3 on: 18 Oct 2004, 18:42:40 »
Take a look on this page for Igor Drukov's "Event Handlers" tutorial. He gives some excellent examples on the use of EHs in OFP.

                                               Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.