OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bazooka_Boy on 28 Jan 2004, 20:37:05

Title: Need Knowlegable help on eventhandlers
Post by: Bazooka_Boy on 28 Jan 2004, 20:37:05
Not having used eventhandlers yet I was wondering if someone in the know can tell me if this idea sounds possible.

*Problem*
Bunker addon - Gets hit by tank shell. Occupants should be unhurt but insted die.

*Idea*
I've made the bunker with big think fire geometry walls but a single tank shell still kills all occupants.  Small arms fire does not affect the occupants.

Could the Hit eventhandler be used to capture the hit of tanks/large shells and launch a script to somehow protect those inside.

I thought either by setting them as invincible whilst the explosion happens then back to their original heath straight after.

Or by somehow making the shell cause no damage (just the explosion).

Please can someone let me know if this idea could work and is worth spending time on??

Bazooka_Boy
Title: Re:Need Knowlegable help on eventhandlers
Post by: macguba on 28 Jan 2004, 21:21:27
Eventhandlers are specifically designed to launch a script when the event occurs, so that part is fine.     The problem is whether blast from a shell hitting the outside of a wall would register as a hit or just general blast, which does not cause the hit eventhandler to fire.    Worth giving it a try though.

If the loons are dying you might be better off with eventhandler killed.    
Title: Re:Need Knowlegable help on eventhandlers
Post by: Bazooka_Boy on 28 Jan 2004, 21:50:23
Thanks for the reply.

I'll try and give it a go to see if the hit eventhandler is fired.  Reading what you said I also thought that currently the bunker cannot be damged.  So I would need to set it up so it could be damaged in order to get the 5% and then the script could set the bunker back to full health along with the loons.

But with eventhandler killed I suppose you would fire the script and use that to recreate the loons?

Baz