OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Nasty Buttler on 15 Oct 2002, 02:35:57

Title: New Commands Syntax and Comref....
Post by: Nasty Buttler on 15 Oct 2002, 02:35:57
any ideas???
Title: Re:New Commands Syntax and Comref....
Post by: Black_Feather on 15 Oct 2002, 05:44:09
well the event handler is pretty easy,

this AddEventHandler ["event", "actiontotake"]

so it works like ths

this AddEventHandler ["hit", "hint {I'm hit}"]

the other events are

Killed
Hit
Dammaged
GetIn
GetOut
Init
Engine
Gear
Fuel
Fired
IncomingMissile

and you can use {} instead of " " for strings now, setvelocity is weird, I can't get things to move where I want yet

vehiclename setVelocity [1000,10,10]

[edit]

it looks like Chomps has figured out setvelocity here (http://www.ofpec.com/yabbse/index.php?board=11;action=display;threadid=2578).
Title: Re:New Commands Syntax and Comref....
Post by: Black_Feather on 15 Oct 2002, 06:04:00
and you can removeeventhandler like this

player removeEventHandler ["event",0]

I don't know what the 0 does but it doesn't work with a 1
Title: Re:New Commands Syntax and Comref....
Post by: Kaliyuga on 15 Oct 2002, 07:05:46
 How about  the new setvelocity command

it's a pretty fun one to fool around with too