OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Nico [BOS] on 11 Nov 2009, 22:47:36
-
Hello,
I need to find the name (cfgVehicles) of this object :
(http://img38.imageshack.us/img38/8875/transfoq.th.jpg) (http://img38.imageshack.us/img38/8875/transfoq.jpg)
It can be seen on Chernarus :
- 124 028, with ID 95494,
- 045 129, with ID 344585.
on Utes :
I tried to display the name with this little script :
_obj = ([0,0,0] nearestObject ID);
sleep 1;
hint format ["%1", (typeOf _obj)];But it doesn't work with those ID.
So, do you know the name of this object or do you have an other way to display it ?
Thank You :)
-
Put yourself near the object and then run this code...
_nObject = getPos player nearestObject 10548;
hint format ["%1", (typeOf _nObject )];
You need to be within 50 meters.
-
Thank you but it doesn't work. Even if I am very close to the object.
-
This works for me.. by putting in a radio trigger...
nObject = getPos player nearestObject 95494; hint format ["%1", nobject];
I suspect because this object is an island object it isn't able to return the typeOF because there is no config definition for it.
-
It has no classname, as hoz suspected it has no config entry anywhere, its model name is powlines_transformer1.p3d.
Planck
-
Ok, like I can't use a creatVehicle on this object or check if it's alive or not, I found an other way to continue my mission.
Thanks a lot :)
-
You can still check on the health of the object.
ObjLocal = nameofsomeyouplaced;
nObject = getPos ObjLocal nearestObject 95494;
hint format ["%1",getdammage nObject];