Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Event Handlers; what are the different handlers  (Read 1098 times)

0 Members and 1 Guest are viewing this topic.

Frosty

  • Guest
Event Handlers; what are the different handlers
« on: 23 Jan 2003, 23:29:17 »
Hey, I'm having trouble getting any information on the EventHandlers in Addon CPP configs. I want to add some little scripts to my addon that execute when it spawns on the map. what is the handler I put in. I've got:

class EventHandler(s - cant rememeber)
{
   ?HANDLER? = _this select 0 setface "faceX"
};

What handler to I put in, and what are all the different ones. Ive searched this forum, the official OpFlash1985 forums, and checked the official command reference (which says check scripting topic EventHandlers but I have no idea where it is!)

Please help! :'(

Frosty

  • Guest
Re:Event Handlers; what are the different handlers
« Reply #1 on: 25 Jan 2003, 00:52:06 »
Pretty pretty please, with a _this select 5 on top! I'll even throw in a [please] exec "help me.now" if you reply within the next 5 hours.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Event Handlers; what are the different handlers
« Reply #2 on: 27 Jan 2003, 17:47:02 »
You talking about this?:

Code: [Select]
Event handlers
    Event handlers can be defined in unit config or by function addEventHandler. Multiple handlers can be attached at one time. Event handler types are defined below. Each handler receives arguments in _this, argument types and meaning are defined below.
   
    "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
   
    (1) position can be "driver", "gunner", "commander", "cargo"
   
    MP notes: "Killed" and "Hit" event handlers are executed where given unit is local. All other event handlers are executed on all computers. Events added by addEventHandler may be different on each computer.


~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Frosty

  • Guest
Re:Event Handlers; what are the different handlers
« Reply #3 on: 27 Jan 2003, 22:29:53 »
Thanks for that, although I found out init myself (pretty self-explanatory - how did I not see it! :P)