Home   Help Search Login Register  

Author Topic: deleteEditorObject  (Read 1988 times)

0 Members and 1 Guest are viewing this topic.

Offline ual002

  • Members
  • *
deleteEditorObject
« 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.

Offline F2kSel

  • Members
  • *
Re: deleteEditorObject
« Reply #1 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.

« Last Edit: 20 Jul 2010, 03:45:51 by F2kSel »

Offline ual002

  • Members
  • *
Re: deleteEditorObject
« Reply #2 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
« Last Edit: 20 Jul 2010, 05:39:08 by ual002 »

Offline F2kSel

  • Members
  • *
Re: deleteEditorObject
« Reply #3 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.
 

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: deleteEditorObject
« Reply #4 on: 20 Jul 2010, 13:30:21 »
deleteEditorObject is an 3d editor command.
You cannot use it outside of it.

Offline ual002

  • Members
  • *
Re: deleteEditorObject
« Reply #5 on: 20 Jul 2010, 19:36:14 »
Oh well, thanks for the input.  How would I know what other commands are 3d editor only?

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: deleteEditorObject
« Reply #6 on: 23 Jul 2010, 15:45:50 »