OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rubble_Maker on 08 Nov 2002, 21:24:11

Title: addEventHandler
Post by: Rubble_Maker on 08 Nov 2002, 21:24:11
Anyone any success using the new addEventHandler command? I just tried all available handlers and so far the only one that works is the "Dammage" handler - unfortunately it only works if the vehicle gets totally destroyed, so its virtually useless.

Am I too stupid or is this stuff broken?
Title: Re:addEventHandler
Post by: LCD on 08 Nov 2002, 21:46:35
longtime no c ruble maker ;D (if u r da same ruble Maker  ;)  ;D)

bout da command - i think u r st00pid  :P  ;D - works fine 4 me -  ;D

can u describe da prob (ya know - wat u exactly wanna do  ;D) so we can help u ?

LCD OUT



Title: Re:addEventHandler
Post by: Rubble_Maker on 09 Nov 2002, 00:05:43
ya still the same Rubble_Maker ;)

dont really think I'm stupid; the addEvent command works fine for soldiers but not for vehicles. Also I noticed that its "Dammaged", not "Dammage" like it says in the OCR.

Title: Re:addEventHandler
Post by: LCD on 09 Nov 2002, 01:03:41
* checks

it works fine 4 me  ;D

nywayz check dis thread - its in da Official forums so u may need 2 register

click here  ;D (http://www.flashpoint1985.com/cgi-bin/ikonboard301/ikonboard.cgi?s=3dcc14ee6659ffff;act=ST;f=7;t=21097;hl=addeventhandler;st=0)

LCD OUT
Title: Re:addEventHandler
Post by: Rubble_Maker on 09 Nov 2002, 16:14:55
weird...

could ya send me a working demo of the Dammage handler? I mean for a chopper, not soldiers.

btw what version do you have?

Title: Re:addEventHandler
Post by: LCD on 09 Nov 2002, 16:49:15
i know wats da dammage handler - it only works if da unit is dammaged by crashin into building or drivin in da sea  ;D - so if u wanna check wen its hit by som1 u gotta use da  hitt eventhandler ond if u wanna check wenever its dammaged just use da old getdammage command  ;)   ;D

i wil make example mision wid speacial writer script (it wil tell u wat arry each handler returns  ;D) 2day

LCD OUT
Title: Re:addEventHandler
Post by: LCD on 09 Nov 2002, 20:07:41
here is an example mision 4 eventhandlers - 2 get da dammaged command work u have 2 get 2 ur heli nd crash urself  :P  ;D as da dammaged works on dammage not from shotin  ;D

LCD OUT
Title: Re:addEventHandler
Post by: Rubble_Maker on 09 Nov 2002, 21:14:46
Thx man; I gotta use hit and getdammage then.

At least the IncomingMissile stuff works great.
Title: Re:addEventHandler
Post by: Doolittle on 09 Nov 2002, 22:30:10
Code: [Select]
_things = _this select 0
_n = 0
_num = count _things
_string = ""

#loop
_string = _string+(format ["%1",(_things select _n)])+"\n"
_n = _n + 1
? _n > _num : goto "end"
goto "loop"

#end
hint _string

exit

What are you doing here?  You just want to see what is passed on an event?!  That's a lot of work!  Why not just do:

player globalchat format ["%1", _this]

..?

Doolittle
Title: Re:addEventHandler
Post by: LCD on 10 Nov 2002, 00:47:33
i was just trin 2 help - i didnt think bout it nd aslongas it works i dont care  :P - im not gonna changeit all 2 simpler script cuz its already workin

LCD OUT