OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: ual002 on 20 Jul 2010, 02:38:21

Title: deleteEditorObject
Post by: ual002 on 20 Jul 2010, 02:38:21
Ok i tried the BI wiki and here and unless im blind i dont see any reference that I can understand to this command.

deleteEditorObject

BIS wiki says

map deleteEditorObject object

What map is god knows what, I couldnt understand. And object is probably the object # you want gone, easy enough.

Using something like a1 = position player nearestObject 276740; a1 setDamage 1; is not appropriate because I want the debris gone. 

Can someone show me how this works?  The map was Chernarus if that makes a difference.
Title: Re: deleteEditorObject
Post by: F2kSel on 20 Jul 2010, 03:41:15
a1 will hold an array of all objects found within a certain range of the player.

you could access that array by using the following

{_x setdamage 1} foreach a1;

another way is to place a game logic and give it a name ie  location  place it where you want to use it.

a1 = nearestobjects [location,[], 100];

location is the game logic, this could also be player
[] can contain a sort of filter   ie    ["house"]   or ["house","man"] so only those or would be effected, leaving it empty lets it gather all objects and units into the array.
100 is just a radius and can be changed as required.



so to kill all men in an area it would be

a1 = nearestobjects [location,["man"], 100];
{_x setdamage 1} foreach a1;



to make objects invisible
a1 = nearestobjects [location,[], 100];
{_x hideobject true} foreach a1;

 
There are of course many different commands that can be placed between the {} of the foreach command.

Title: Re: deleteEditorObject
Post by: ual002 on 20 Jul 2010, 05:08:34
Informative thank you, however I'm guessing your unsure how to use deleteEditorObject command?

im going to try the hideobject command in the mean time

EDIT


Quote
to make objects invisible
a1 = nearestobjects [location,[], 100];
{_x hideobject true} foreach a1;

No worky, im trying to clear walls, pipebundles and trees/shrubs, they all have editor ID #s
Title: Re: deleteEditorObject
Post by: F2kSel on 20 Jul 2010, 12:13:14
Then I'm afraid your out of luck, trees and walls cannot be deleted. Deletecollection did do this however it's functionality was removed and replaced with the hideobject command which has no effect in this situation.

It was a great command but some couldn't use it without it causing problems so it got downgraded.
 
Title: Re: deleteEditorObject
Post by: kju on 20 Jul 2010, 13:30:21
deleteEditorObject is an 3d editor command.
You cannot use it outside of it.
Title: Re: deleteEditorObject
Post by: ual002 on 20 Jul 2010, 19:36:14
Oh well, thanks for the input.  How would I know what other commands are 3d editor only?
Title: Re: deleteEditorObject
Post by: kju on 23 Jul 2010, 15:45:50
http://community.bistudio.com/wiki/Category:Command_Group:_Editor_Control

And look at the modules pbo with the 3d inside.