Home   Help Search Login Register  

Author Topic: OBJECT ID's  (Read 2286 times)

0 Members and 1 Guest are viewing this topic.

Offline stephen271276

  • Members
  • *
OBJECT ID's
« on: 02 Feb 2011, 17:14:39 »
Any way to read an object id that the number in the box is cover partially by another id box?

Offline F2kSel

  • Members
  • *
Re: OBJECT ID's
« Reply #1 on: 02 Feb 2011, 18:51:52 »
If it's a building then you can just use a trigger placed over the building and group it to the building.
Then just pop this in  the on act window  Hint Format["%1 Object",thislist select 0];

If it wont group or it's a tree or road ect then you can use the following script.
If you increase the number being past to the scipt (2) you can increase the area being searched or destroyed.


Code: [Select]
// place this into a game logic int  nul=[this,2] execVM "ID.sqf"  and place the game logic over the object your looking for.
// To destroy an object enable the setdamage command
// place a game logic where you want to get the ID number or type of object
//
_location = _this select 0;
_radius   = _this select 1;

//_what = nearestobjects [_location,["Building"], _radius]; //buildings only
_what = nearestobjects [_location,[], _radius]; // everything
sleep 0.5;
{
Hint Format["%1 Object",_x];
      //_x setdamage 1; // To damage the object
sleep 4;
} forEach _what;
« Last Edit: 02 Feb 2011, 18:56:01 by F2kSel »