- Legacy ID
- No Bug
Create AmmoCrate in Mission editor
in INIT string type
' this setvehiclevarname "TEST123" '
When you mouseover and use hint like
hint format ["VarName = %1", cursortarget]
The object is referred too as the varname you set.
in debug type
player setpos (getpos TEST123)
This does not work and the player stays where he is.
It does work but it is a little confusing.
this setvehiclevarname "TEST123";set the visible name only.
missionNamespace setVariable ["TEST123",this]; changes the physical name
They do not need to be the same either and you may not need both but it makes sense to keep them the same.
This is not a bug, detailed explanation of how command works is in the command description on BIKI page
In BIKI documentation:
"So if you want to refer to the actual object by its vehicleVarName, an extra step needed to assign the object to a variable of the same name.
_offroad setVehicleVarName "MyFerrari"; MyFerrari = _offroad;"
Sure thing, When you have an "identified" vehicle (_offroad), you can rename it, then delete it. You don't need to rename it for that.
Same for TEST123 = cursortarget; then later, delete TEST123 works!
OK, it's not a bug, but to be consistent, this function should be improved in order to be more useful and less confusing.
Place a unit with empty name. use setVehicleVarName to give it a name ("TEST123").
_string = "TEST123"; _object = call compile _string; deleteVehicle _object;
deleteVehicle (missionNamespace getVariable ["TEST123",objNull]);
Please make this function able to delete (or else) the "refering" vehicle.
It's not hard to add
missionNamespace setVariable ["TEST123",this];
It's just impossible to guess it for common guys who intend to script.
or create a setVehicleObjectName...
or, at least, add this mission miraculous variable in BIKI.
The command works as intended, and no changes will be made to it because of backwards compatibility. Going to close this to stop unnescessary bumping.