Jump to content
M1ke_SK

Actions - GetInTurret when already in vehicle [MP]

Recommended Posts

Actions - GetInTurret

 

I am sitting in turret position [1] in vehicle. I am using addAction to change seats.

 

I want to change seats in vehicle (MP / DEDI).

_vehicle addAction ["Move to gunner #2", 
{
    private ["_target", "_caller", "_id", "_arguments"];
    params [
        "_target", //Object - the object which the action is assigned to
        "_caller", //Object - the unit that activated the action
        "_id" //Number - ID of the activated action (same as ID returned by addAction)
    ];

    if(_target turretUnit [2] != objNull) then 
    {
        /* code */
        _caller action ["getInTurret", _target, [2]]; //Global - instantly moves a person (who is not already in a vehicle)
        _caller assignAsTurret [_target, [2]]; //Local
        _caller moveInTurret [_target, [2]]; //Local
        /* code */
    }
    else 
    {
        ["Pilot","Gunner position #2 is occupied!"] remoteExec ["BIS_fnc_showSubtitle", _caller];
    };
}];

I should use

_caller action ["getInTurret", _target, [2]];

but condition is to be out of vehicle.

 

Any suggestions? @KK ?

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

×