Jump to content

Robustcolor

Member
  • Content Count

    308
  • Joined

  • Last visited

  • Medals

Community Reputation

23 Excellent

1 Follower

About Robustcolor

  • Rank
    Staff Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Robustcolor

    RemoteExec and moveInDriver problem

    Thanks for the help Pierre, since it's only the server that will handle the deleting of the vehicles then i guess i could only send it to the server as publicVariableServer "_veh" instead of sending the variable to everyone. The loop is only running from server. Correct? Or making it public is unnecessary and just a regular check with getVariable if a non public variable is set on the vehicle?
  2. Robustcolor

    RemoteExec and moveInDriver problem

    Question, as the code above shows that i'm creating the vehicle locally from an addAction that is placed inside a eden object, then sending it to the server that has a delete script with code [_veh] remoteExec ["DeleteVehicle",2]; If i would like to use an array instead on serverSide and send each vehicle created into it, do i need to remoteExec pushBack _veh or something else so the server can handle every vehicle that each player creates locally. My idea was something like this, but how would i get each vehicle inside the array? serverSide allVehicles = []; while {true} do { if (!alive _x) then { deleteVehicle _x playerVehicles deleteAt (playerVehicles find _x); }; sleep 60; }; } count allVehicles; ClientSide from addAction params ["_subFnc","_caller"]; call { if (_subFnc == 0) exitWith { private _position = getMarkerPos "Helicopter"; private _veh = createVehicle ["B_Heli_Light_01_F", [0,0,0], [], 0, "FLY"]; _veh setPos _position; _caller moveInDriver _veh; allVehicles pushBack _veh; };
  3. Gives a empty array []. Can't selectRandom _enemyUnits;
  4. Hi, which is the simpliest way to fetch each units from a group into an array using configFile? I'm trying it like this but it's not working. _enemyUnits = [[configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfAssault"]]; _group = createGroup [east,true]; _unit = _group createUnit [selectRandom _enemyUnits,getMarkerPos "Marker1",[],0,"CAN_COLLIDE"];
  5. Robustcolor

    Help with set/get variable

    Never doubt, i'm just trying to understand the context in using the different codes 😎 if (_x getVariable ["Test", true]), my guess is that this would work and only once as your code does but maybe not the most efficient way. Thanks @pierremgi
  6. Robustcolor

    Help with set/get variable

    if (_x getVariable ["Test", true])
  7. Robustcolor

    Help with set/get variable

    @panther42 Seems like i missed something, confused me abit why it would execute when it should not. It's working like you said 🙂 Question, adding a setvariable to each units not having it assigned and not repeating it on units which has it i guess adding true instead of false in the if ()? { if (_x getVariable ["Test", true]) then { _x setVariable ["Test", true]; _x setSkill 1; }; } forEach allUnits;
  8. Robustcolor

    Help with set/get variable

    Why does this example below execute the code inside the if () then {}; even if _x has not the variable assigned. But the _veh variable above would not? { if (_x getVariable ["Test", false]) then { _x setVariable ["Test", true]; }; } forEach allUnits; This code below won't execute when checking == true. { if (_x getVariable ["Test", false] == true) then { _x setVariable ["Test", true]; }; } forEach allUnits; What am i missing here?
  9. Robustcolor

    Help with set/get variable

    Thanks @panther42
  10. Robustcolor

    Help with set/get variable

    I''ve been using the top one but as you said it could cause some error or nothing at all if variable is not set before when checking if the variable is true or false. _veh setVariable ["RWPoint",true]; Since many vehicles don't have this variable i just want to check if a specific vehicle has the variable and that it's true. Is this good or bad practice to check if the variable is true or false? if (_veh getVariable ["RWPoint",false] == true) then {}; or is it enough to check it like this if (_veh getVariable ["RWPoint",false]) then {}; but that will add a variable to it with false, Unnecessary?
  11. Robustcolor

    lockInventory issue.

    Hm, how do i check if a player has something in jip queue then delete it upon disconnection? addMissionEventHandler ["HandleDisconnect",{ remoteExec ["", "name _this select 0"]; }];
  12. Robustcolor

    lockInventory issue.

    Thanks @sarogahtyp I have to execute the command again when a player respawn else the backpackContainer is not locked. InitPlayerLocal.sqf [backpackContainer player, true] remoteExec ["lockInventory", -2, true]; onPlayerRespawn.sqf [backpackContainer player, true] remoteExec ["lockInventory", -2, true]; I have a question about JIP queue. The above code won't fill up the jip queue but in other context it would. How to prevent stacking in jip queue? -2, true makes a new unique jip id everytime it's executing the command filling up the queue. Maybe this would work? [backpackContainer player, true] remoteExec ["lockInventory", -2, name player]; should make the player name the unique jip id, correct?
  13. Hi, does not this command work in a dedicated server on players? initPlayerLocal.sqf backpackContainer player lockInventory true; I'm checking if the inventory is locked with lockedInventory backpackContainer player and it says it's true but it still accessible from a third party.
  14. I will try this _rsp = [west, _veh, "Helicopter"] call BIS_fnc_addRespawnPosition; waitUntil {!alive _veh}; _rsp call BIS_fnc_removeRespawnPosition; Also, i remember using a script command in initServer for showing the respawnPosition markers a while back, can't find it again. Anyone know?
  15. addRespawnPosition function duplicates and overwrite names and it also replaces the editor placed respawn_west markers name when a vehicle is destroyed in the respawn menu. I have two markers on the editor called respawn_west and respawn_west1. I'm also creating different vehicles then adding respawnPositions to them from scripts. variable _veh is not used in same script. I've tried both of these _rsp = [west, _veh, "Helicopter"] call BIS_fnc_addRespawnPosition; _rsp1 = [west, _veh, "Boat"] call BIS_fnc_addRespawnPosition; _rsp2 = [west, _veh, "Car"] call BIS_fnc_addRespawnPosition; [west, _veh, "Helicopter"] call BIS_fnc_addRespawnPosition; [west, _veh, "Boat"] call BIS_fnc_addRespawnPosition; [west, _veh, "Car"] call BIS_fnc_addRespawnPosition; When a vehicle is destroyed. waitUntil {!alive _veh}; [_veh] call BIS_fnc_removeRespawnPosition; This don't work properly.
×