Jump to content
AaronZockt

Variable Name of a specific Object Type.

Recommended Posts

Hello there,

I'm currently trying to pass the variable name of certain objects to another script, but so far I've had no success. If anyone of you has a solution, I would be very grateful :S
 

_array = ["", "", ""];
{
    if (typeOf _x in _array) then {
        _x addAction ["Test", {[_x VARIABLE NAME] execVM "test.sqf"}];
    };
} forEach (allMissionObjects "");

 

Share this post


Link to post
Share on other sites

And what would be the best way to pass the Object itself to the external Script? :S

Share this post


Link to post
Share on other sites
_array = ["RoadCone_F"];
{
    if (typeOf _x in _array) then {
        _x addAction ["Test", "test.sqf"];
    };
} forEach (allMissionObjects "");

test.sqf:

params ["_target", "_caller", "_actionId", "_arguments"];

_varname = vehicleVarName _target;
systemChat _varName;
deleteVehicle _target;

 

Share this post


Link to post
Share on other sites
3 hours ago, AaronZockt said:

Hello there,

I'm currently trying to pass the variable name of certain objects to another script
 

Could you elaborate?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×