Jump to content
fingolfin

[Solved] Deleting an deactivated mine?

Recommended Posts

Hello folks,

 

during a mission an IED named IED_O1E is placed via a trigger at the position of the game logic IED_01:

 

IED_O1E = "IEDLandSmall_Remote_Ammo" createVehicle [(getPos IED_01 select 0),(getPos IED_01 select 1), 0.0];

 

After the IED is deactivated by the player, I want to delete it via a trigger. Unfortunately

 

deleteVehicle IED_01E;

 

doesn’t work if the IED has been deactivated. For some reason, it works when the IED is active.

 

Does someone have an idea how I could address/delete the deactivated mine?

 

Best regards

Fingolfin

Share this post


Link to post
Share on other sites
41 minutes ago, Midnighters said:

why not just createMine it? 

should work after that.

 

Thanks! I will try that too. So far I found a workaround by deleting all objects in a one meter radius around the game logic.

{deleteVehicle _x} forEach nearestObjects [IED_01, ["all"], 1];

 

Share this post


Link to post
Share on other sites

If your workaround turns into your solution then i would change "all" to the class name "IEDLandSmall_Remote_Ammo"

Share this post


Link to post
Share on other sites

This might work:

{if ((_x isKindOf "IEDLandSmall_Remote_Ammo") && (mineActive _x)) then {

deleteVehicle _x;} forEach allMines;

Share this post


Link to post
Share on other sites
13 hours ago, sarogahtyp said:

If your workaround turns into your solution then i would change "all" to the class name "IEDLandSmall_Remote_Ammo"

 

This doesn't work for some reason. It seems the mine somehow changes it's class name after being deactivated, because it works fine with the parameter "all".

Share this post


Link to post
Share on other sites

They probably turn into groundweaponholder or similar.

  • Like 1

Share this post


Link to post
Share on other sites

If you

9 hours ago, fingolfin said:

 

This doesn't work for some reason. It seems the mine somehow changes it's classname after being deactivated, because it works fine with the parameter "all".

if you diag_log the returning array of nearestObjects then you will get the correct classname.

maybe it is "IEDLandSmall_Remote_Mag"

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, sarogahtyp said:

If you

if you diag_log the returning array of nearestObjects then you will get the correct classname.

maybe it is "IEDLandSmall_Remote_Mag"

 

Thanks, the class name is "GroundWeaponHolder". So, @Tankbuster was right.

  • Like 1

Share this post


Link to post
Share on other sites

Yey. I helped twice in one week! I'm going to have a lie down.

  • Like 2

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

×