Jump to content
Sign in to follow this  
roguetrooper

Eventhandler "hit" should trigger on allowDamage-false-things

Recommended Posts

It would be nice if the eventhandler "hit" would trigger on units/vehicles/map-objects that are set to "allowdamage false".

Share this post


Link to post
Share on other sites

I guess they have done this so that the EH doesn't continually fire when someone has set allowdamage false. If you want to get around this, you can use;

this addEventHandler ["HandleDamage",{}]

Which will allow the hit EH to operate, but simply assign no damage to the unit/object when it is hit (having the same affect as allowdamage false).

By the way, I learned this from Celery's excellent explanation of HandleDamage when I was building a test-rig for an addon a while back.

Edited by Jedra

Share this post


Link to post
Share on other sites

Yeah, allowdamage false is a clunky way of doing, but to be honest, it's working as you would expect. You told it not to allow damage, so the hits don't count. Expected behaviour, surely?

As Jedra says, Handledamage is a better way of doing this, as it allows all the other EH to work still.

Share this post


Link to post
Share on other sites

Is there a way to just have "allowdamage false" for the AI spawn in with a observation site being used to garrison structures at player base?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×