Home   Help Search Login Register  

Author Topic: Event Handlers  (Read 645 times)

0 Members and 1 Guest are viewing this topic.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Event Handlers
« on: 09 Jul 2003, 04:39:19 »
Hi all,

I recently got OFP:R (finally), and have been furiously trying out all the new scripting commands. I have a quick question, about eventhandlers. I understand the basics of them, and have seen some examples of a couple (like "fired" or "killed"), but I don't really know about all of them. I can't find any tutes or anything about them, other than the vauge description provided in the official com. ref:

    "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

Fired, hit and killed are all self explainitory, but what about the rest? I tried putting an "incoming missle" on myself, and having an enemy shoot at me, but the handler didn't go off. What about "gear"? What the heck is that about? What sets it off?

If somebody could be so kind as to provide a quick sentence or two about each eventhandler and what triggers it, I would be much obliged.

Thanks! :D
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Event Handlers
« Reply #1 on: 09 Jul 2003, 19:48:53 »
*salutes*

Hi General.

"getin" / "getout" : triggers something when you get in/out of the vehicle ;
"incomingmissile" : when vehicle is locked and shot at by some AT6 or HellFire ;
"gear" : true when gear of your PLANE is down, false if not.
"dammaged" : for infantry units only, even returns what part of the body was hit ("nohy" for the legs, "ruce" for the hands, "hlava" for the head, "telo" for torso.)
"engine" : when engine's on.

As to "fuel" and "init", couldn't get them working.

I'm a true event handler fan : should you want further information, I'll be around.
:cheers:

max_killer_payne

  • Guest
Re:Event Handlers
« Reply #2 on: 09 Jul 2003, 20:16:43 »
I don't quite understand Igor Drunkov Im not getting at you honestly  ;D  just wish if you could explain it.

So if I put in a trigger:

manname AddEventHandler ["Hit"{maname sidechat I'm hit!!}]

He'll reply with that if he is hit? But how would that tell you what part of his body gets hit?

And if I put in

manname AddEventHandler ["GetIn"{manname sidechat Okay, Im ready to go}]

He'll reply with that once he enters a vehicle?

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Event Handlers
« Reply #3 on: 09 Jul 2003, 23:32:09 »
Check here.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Event Handlers
« Reply #4 on: 10 Jul 2003, 05:19:41 »
Thanks for the help Igor! I'll be sure to contact you if I have any more questions!  ;D
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!