Jump to content
Sign in to follow this  
Gemini

Impossible to destroy empty objects

Recommended Posts

Hi all,

I'm trying to add an event handler to an empty object (IED) :

_IED addEventHandler ["Hit", {hint "ok, my IED has been hit !"}]

It was working on ArmA II, but not on ArmA III: is it a (known) bug or not ?

Edit: I have tried with a few empty objects, not only IEDs: ModuleExplosive_IEDLandBig_F, ModuleExplosive_IEDUrbanBig_F, ModuleExplosive_IEDLandSmall_F, ModuleExplosive_IEDUrbanSmall_F, Land_Tyres_F, MapBoard_seismic_F...

Edited by Gemini
more explicite title

Share this post


Link to post
Share on other sites

In case someone would be interested, here is what I did to get around this problem :

_invisibleObject = "Box_East_Ammo_F" createVehicle [(getPos _IED select 0), (getPos _IED select 1), 10] ; // creates a valid object that is allowed to get damage (zPos = 10 is needed because IED will explose if the box is spawned on it)
_invisibleObject attachTo [_IED, [0,0,0]]; // attaches it to our buggy IED object
_invisibleObject hideObjectGlobal true; // sets it invisible
_invisibleObject addMPEventHandler ["MPHit", {{_x setDamage 1} forEach (nearestObjects [_this select 0, [], 10])}]; // creates an EH that will trigger the IED when the invisible object will be hit

Known bug: due to the invisible setting, the EH only triggered if the invisible object is hit by an explosion (grenade or charge). It doesn't trigger if you fire on it unfortunately... If anybody has an idea, I would be happy to talk about it :)

Edited by Gemini

Share this post


Link to post
Share on other sites

You may want to remove all items from the box as AI will still see it and get more ammo.

Or it may be just an A3 issue.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

No, AI doesn't seem to want to get ammo so it's not a problem :).

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  

×