Jump to content
  • 0

Map markers and vehicle set tokens


spartan

Question

I have used the below statement in my custom pbo to stop vehicles in my custom areas from dissapearing but since 0.3.3.0 update it is creating an error.

private ["_obj"];
    _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    if (_x select 4) then {
        _obj setDir (_x select 2);
        _obj setPos (_x select 1);
    } else {
        _obj setPosATL (_x select 1);
        _obj setVectorDirAndUp (_x select 3);
    };
    if ((_obj iskindof "Air") || (_obj iskindof "Tank") || (_obj isKindOf "Land") || (_obj isKindOf "Ship"))then{ //Add this to check for vehicles and set the vToken
        _obj call EPOCH_server_setVToken;
    };
} foreach _objs;

The same goes for my map markers which live in the same pbo :

_marker = createMarker ["Marker2",[7914.592,105.04506,19184.223]];
_marker setMarkerType "mil_objective";
"Marker2" setMarkerText "Abandoned Research Site";
"Marker2" setMarkerColor "ColorRed";
"Marker2" setMarkerSize [1,1]

I just wondered if anyone would know why these are throwing errors when they were working fine before.

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Also, you are missing a {  here:

{
private ["_obj"];
    _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    if (_x select 4) then {
        _obj setDir (_x select 2);
        _obj setPos (_x select 1);
    } else {
        _obj setPosATL (_x select 1);
        _obj setVectorDirAndUp (_x select 3);
    };
    if ((_obj iskindof "Air") || (_obj iskindof "Tank") || (_obj isKindOf "Land") || (_obj isKindOf "Ship"))then{ //Add this to check for vehicles and set the vToken
        _obj call EPOCH_server_setVToken;
    };
} foreach _objs;

 

Link to comment
Share on other sites

  • 0

Also, you are missing a {  here:

{
private ["_obj"];
    _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    if (_x select 4) then {
        _obj setDir (_x select 2);
        _obj setPos (_x select 1);
    } else {
        _obj setPosATL (_x select 1);
        _obj setVectorDirAndUp (_x select 3);
    };
    if ((_obj iskindof "Air") || (_obj iskindof "Tank") || (_obj isKindOf "Land") || (_obj isKindOf "Ship"))then{ //Add this to check for vehicles and set the vToken
        _obj call EPOCH_server_setVToken;
    };
} foreach _objs;

 

That bracket is in place it is just the way I copied/pasted it that has left it out.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...