OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: ofp..hahha on 01 Dec 2002, 22:23:23

Title: Event Handlers questions.
Post by: ofp..hahha on 01 Dec 2002, 22:23:23
Ok guys for a long time now people havent known about using event handlers in there cpp but i would like to know how to use them and maybe start a sticky for a compilation of them for other people to use. I would like a Example or some input on a event handler for damage like in the ah-1 cobra how the light blinks and the sound goes off when you are damaged so please put what you know about this and snippets in this topic.

thx  :P
Title: Re:Event Handlers questions.
Post by: MidShip on 02 Dec 2002, 13:43:36
It's described in the official comref (Item Scripting Topics).
Title: Re:Event Handlers questions.
Post by: ofp..hahha on 02 Dec 2002, 23:21:19
no thats not what i want that tells me nothing im talking about HOW? they do it, what does the script look like?
Title: Re:Event Handlers questions.
Post by: MidShip on 03 Dec 2002, 14:38:31
Have made a small template. Maybe it helps more. All is packed in a small .pbo you have to depbo.
Title: Re:Event Handlers questions.
Post by: ofp..hahha on 03 Dec 2002, 23:21:40
Yeah but i dont want it for the gear i want things like the light blinks in the cockpit if you are damaged just like in the ah-1 cobra.
Title: Re:Event Handlers questions.
Post by: MidShip on 07 Dec 2002, 15:27:07
Let the event handler of your choice (init, killed etc. (comref)) invoke the setObjectTexture statement, to toggle the textures for simulating blinking lights (see the position lights on the jpg of the template craft). For night effects, do use the proper vetices lightning.