Jump to content

Crazy_Man

Member
  • Content Count

    37
  • Joined

  • Last visited

  • Medals

Community Reputation

12 Good

1 Follower

About Crazy_Man

  • Rank
    Private First Class

Recent Profile Visitors

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

  1. Hi! First, you forgot to change that line: _wp = group vehicleStr addWaypoint [_marker_pos, 0]; with this: _wp = (_this select 0) addWaypoint [_marker_pos, 0]; and Secondly it seems that you have some invisibles characters at line 8 (precisely in the name of your script chooseWaypoint.sqf) so create a new and empty sqf file and retype the code entirely or copy paste this one (retype even the name of the file by yourself) : if (isServer) then { _destinationNumber = round(random 8) + 1; _current_waypoint = "patrol_marker_"+str(_destinationNumber); _marker_pos = getMarkerPos _current_waypoint; deleteWaypoint [(_this select 0), 0]; _wp = (_this select 0) addWaypoint [_marker_pos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointStatements ["true", "[group this] execVM 'chooseWaypoint.sqf';"]; }; If your script isn't found at mission start retype yourself the name of the script in the init field of your squad leader. Don't copy/paste the old one 😉
  2. Hi! All is in the title. For the moment i have this : _configs = "getNumber (_x >> 'scope') >= 2 AND configName _x isKindof 'Car' AND gettext (_x >> 'faction') == 'UNSUNG_E'" configClasses (configFile >> "CfgVehicles"); But it miss the condition to check if the car is armed..
  3. Crazy_Man

    Create camera global

    Spawn it with remoteExec. { // code here } remoteExec ["spawn",-2]; or if you have arguments [arguments,{ // code here }] remoteExec ["spawn",-2];
  4. It's a problem with initialization order. Try to put a delay to your sumi.sqf script like that : waitUntil {time > 5}; // delay //select the current vehicle _veh = _this select 0; //make the driver as variable _dvr = driver _veh; //we save that variable globally chof = [ chof , _dvr ] call BIS_fnc_arrayPush; //chof pushBack _dvr; //publicVariable chof; _veh setfuel 0; //saves the position of the vehicle. call tarta_fnc_safepos; [ "<t color='#FFFF00'>suministros </t>", //acction in yelow "call tarta_fnc_desplz", //script 1 "<t color='#FF0000'>cancelar suministros </t>", //cancel tthe call (red) "call tarta_fnc_VolverZonaSegura" //script 2 ] call tarta_fnc_addaction; //while the driver is alive, reports its status while { alive _dvr } do { call tarta_fnc_reportesPeligro; };
  5. Put this in the init field of your heli : nul = this spawn { _heli = _this; _spotDistance = 2500; // change it as you wish while {alive _heli} do { {if ([side _x, side _heli] call BIS_fnc_sideIsEnemy) then {_heli reveal [_x,4]}} forEach (_heli nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], _spotDistance]); sleep 1; }; };
  6. Use Larrow's code, it corrects 2 errors that I had not seen.
  7. Ho sorry I made a mistake, my bad. I fortgot the "" for params ["_target","_caller","_actionId","_myPassedVariables"]; myPassedVariables params ["_activate","_show","_hide","_player","_slingloadgroup","_trashloc","_slingloadhelortb","_vehiclesupplyloc","_supplyloc","_cargonetloc","_technicalloc","_truckloc","_repairloc"]; So your code should look like : //variable define for schedule task _myVariables = [_activate,_show,_hide,_player,_slingloadgroup,_trashloc,_slingloadhelortb,_vehiclesupplyloc,_supplyloc,_cargonetloc,_technicalloc,_truckloc,_repairloc]; //start action menu _activate = false; slingloadmain = _player addAction [ "SUPPORTS", { params ["_target","_caller","_actionId","_myPassedVariables"]; myPassedVariables params ["_activate","_show","_hide","_player","_slingloadgroup","_trashloc","_slingloadhelortb","_vehiclesupplyloc","_supplyloc","_cargonetloc","_technicalloc","_truckloc","_repairloc"]; _player removeaction slingloadmain; _activate = false; //Loads of other addactions that I'll work on after I get the main menu working properly... }, [ _myVariables,_activate,_show,_hide,_player,_slingloadgroup,_trashloc,_slingloadhelortb,_vehiclesupplyloc,_supplyloc,_cargonetloc,_technicalloc,_truckloc,_repairloc ], 10, false, true, "", "true", // _target, _this, _originalTarget 3, false, "", "" ];
  8. Yes you passed well your variables but your array still wrong, you should write : //variable define for schedule task _myVariables = [_activate,_show,_hide,_player,_slingloadgroup,_trashloc,_slingloadhelortb,_vehiclesupplyloc,_supplyloc,_cargonetloc,_technicalloc,_truckloc,_repairloc]; I think you are confused about the third argument of addAction but for example your first variable passed by the third argument is _activate so to access it it's : _activate = (_this select 3) select 0 Or params ["_target","_caller","_actionId","_myPassedVariables"]; _activate = _mypassedVariables select 0; And for more ease you can write what Grumpy Old Man says at the beginning : params ["_target","_caller","_actionId","_myPassedVariables"]; _myPassedVariables params [_activate]; And finally it give that : params ["_target","_caller","_actionId","_myPassedVariables"]; myPassedVariables params [_activate,_show,_hide,_player,_slingloadgroup,_trashloc,_slingloadhelortb,_vehiclesupplyloc,_supplyloc,_cargonetloc,_technicalloc,_truckloc,_repairloc]; Another thing is that the code executed in an addAction is local to the machine who activate the addAction. If that machine (player) disconnect while his support is called it will end the script brutaly and maybe missed the end of the script. And why do you broadcast those local variables to the server? : publicVariableServer "_activate"; publicVariableServer "_show"; publicVariableServer "_hide"; publicVariableServer "_player"; publicVariableServer "_slingloadgroup"; publicVariableServer "_trashloc"; publicVariableServer "_slingloadhelortb"; publicVariableServer "_vehiclesupplyloc"; publicVariableServer "_supplyloc"; publicVariableServer "_cargonetloc"; publicVariableServer "_technicalloc"; publicVariableServer "_truckloc"; publicVariableServer "_repairloc"; It will not works because they are local variables, you need to broadcast global variables witout underscore at the start of the variable name.
  9. Try waitUntil command. _HVTs = _this select 0; waitUntil {!alive _HVTs}; _marker = createMarker [format["%1_area",vehicleVarName _HVTs], position _HVTs]; // Don't forget to name all your HVTs _marker setMarkerShape "ELLIPSE"; _marker setMarkerSize [10,10]; _marker setMarkerColor "ColorOrange"; sleep 300; deleteMarker _marker;
  10. The caller is the player who activate the action. Since you add your action to a player, the player is both the target and the caller. So, the _caller variable you defined with params command point on the player that activate the action. Grumpy Old Man is right again, you did not put your variables in the third argument of the addAction command.
  11. Grumpy Old Man is right and to broadcast a variable with publicVariable or publicVariableServer you need to use a global variable name without underscore. Since you add the action to a player, the caller is that player so you can (if you want) use the _caller variable to remove or add action after the first assigment of the action but it's not necessary so you can use the _player variable too.
  12. Use the params _caller instead _player passed argument
  13. Crazy_Man

    Make enemy know where player is

    Execute this script in your initServer.sqf : while {true} do { _allPlayers = allPlayers; { if ((side _x) == east) then // put the right ennemy side { for "_i" from 0 to count _allplayers -1 do { _x reveal [(_allplayers) select _i, 4]; }; }; } forEach allUnits; sleep 30; // every 30 seconds };
  14. Crazy_Man

    Weapon On Back - Action Menu

    Put in the init.sqf if (hasInterface) then { player addAction ["Weapon on back", { player action ["SWITCHWEAPON",player,player,-1]; }, nil, 0, false, true, "", "vehicle _originalTarget == _originalTarget"]; };
  15. Oh ok it works in this case, thanks killzone_kid!
×