Jump to content

Crazy_Man

Member
  • Content Count

    88
  • Joined

  • Last visited

  • Medals

Everything posted by Crazy_Man

  1. Same as "BASE" repsawn, just say to your freinds to do not use the respawn button in the menu 🙂 The menu when you press "esc" I mean
  2. In fact, it works BUT, if you press respawn button the onPlayerKilled.sqf will not fire and you will loose all your stuff and get the default stuff of the unit... I don't know how to fix that, but if you get killed on the battlefield it will works like a charm 😉 Maybe some one can help us?
  3. Wait I've tested and that didn't works, i will check now why.. sorry
  4. Because when your unit respawn (player or bot), after respawn the unit will recover it's standard items (weapons, magazines, backpack etc...). Sorry but this time you'll need to create some files in your mission directory. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Create a file named onPlayerRespawn.sqf in your mission folder and put that in : [player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory; And a file named onPlayerKilled.sqf in your mission folder and put that in : [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; I've got the answer from this post. You can do the same things with mods but I think this would do the trick 🙂
  5. Crazy_Man

    AI and waypoints

    What is the type of your third (last I suppose) waypoint?
  6. Crazy_Man

    Troubles with enableAI "Move"

    Like opusfmspol says, the effect of an addAction script is local to the client who performs the action. Compared to your first post you can try this in your end_mission.sqf : _unit = _this select 0; _action = _this select 2; hint "We have done our job for today, lets prepare for tomorrow!"; // hint here for only hint on the action user [[_unit, _action],{ params ["_unit", "_action"]; //hint "We have done our job for today, lets prepare for tomorrow!"; // hint here for all players _unit removeAction _action; _unit enableAI "MOVE"; }] remoteExecCall ["call", 0];
  7. It's possible. The BIS_fnc_respawnTickets function decrease the number of tickets by 1 when players die, but not for bots. The solution for bots is to decrease the number of tickets by 1 manualy with an eventHandler "MPKilled" like on the last script I've wrote. But respawn in an unit of your group (respawn type "GROUP" Respawn types) doesn't take into account tickets. Only "INSTANT" or "BASE" respawn types use tickets. With "INSTANT" you respawn where you died. With "BASE" you respawn at some markers position. Better choice is to use "BASE" respawn type and change the position of the respawn marker after each completed checkpoints. So all playables units (players and bots maked playable) will reappear at the respawn marker position. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In the Eden editor you can choose the "custom repsawn", choose the paramters you want and create a marker named "respawn". You can use the setMarkerPos command to change the position the marker when you need to. eg : "respawn" setMarkerPos [0,0]; Finally use the code I've wrote above in the init.
  8. Ok so you don't need these bots if I understand. You only want to limit the respawn of players. The questions are : - Is it a mission with different sides player? (team PvP with multiple sides for players or only PvE with only one side for players) - Where do you want them to respawn? Respawn types
  9. if (isServer) then { { [_x, 2, false] call bis_fnc_respawnTickets; if (!isPlayer _x) then { _x addMPEventHandler ["MPKilled", { params ["_unit"]; if (isPlayer _unit) then {_unit removeMPEventHandler ["MPKilled",_thisEventHandler]}; if (!isPlayer _x && {[_unit, -1, true] call bis_fnc_respawnTickets < 1}) then {deleteVehicle _unit}; }]; }; } forEach playableUnits; }; This will delete the playable units after twice death. Real players can't respawn more than twice times and if a JIP player takes control of an playable unit he will inherit the respawn tickets (normaly not tested). Because the 8 bots from each players group isn't playable units (I suppose), they can't have access to respawn. What type of respawn do you use?
  10. So each player have it's own group with 8 Ai, is that right?
  11. If you don't want to use a file init.sqf in your mission folder you can add the code in the Eden editor : tab attributes > General > init. > copy/paste the code there. The code i wrote will only have effect on the playable units. But what do you mean with "allied bots"? bots don't respawn.
  12. In the "condition for the action to be shown" you can add this : "p1 distance p3 < 5 && !(captive _this)", So : [ p3, "Release Player", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "p1 distance p3 < 5 && !(captive _this)", "p1 distance p3 < 5", {}, {}, {p3 playMove "Acts_AidlPsitMstpSsurWnonDnon_out"; p3 setCaptive false;}, {}, [], 5, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0 , p3];
  13. There is this command BIS_fnc_respawnTickets. For example in the init.sqf : if (isServer) then { {[_x, 2, false] call BIS_fnc_respawnTickets} forEach playableUnits; };
  14. Crazy_Man

    Mission Rotation

    Do you use the autoSelectMission parameter?
  15. Try to use the move command with the exact values that you get with BIS_fnc_buildingPositions. Don't do a getPosAtl of the arrow. Works fine here. EDIT : not working, I've just tested but I don't understand why because I already done that with that script : _group = _this select 0; _tower = _this select 1; _side = side (leader _group); _arrayPos = [14,11,16,7,4,2,8]; _arrayPos sort false; hint "AI_CAPTURE START"; // TEST !! // leader should not issue attack orders _group enableAttack false; _nameTower = format ["%1", _tower]; _units = []; {if (_x getVariable _nameTower and alive _x) then {_units = _units + [_x]}} forEach allUnits; // list tower units _towerGroup = group (_units select 0); while {{alive _x} count units _group > 0} do { private ["_position"]; _countUnits = {alive _x} count units _group; // count units group attack // CLEAR BUILDING //systemChat "AI_CLEARBUILDING"; _units = []; {if (_x getVariable _nameTower and alive _x) then {_units = _units + [_x]}} forEach allUnits; // list tower units // get nearest ennemy unit _arrayEnnemyUnitsDist = []; for "_i" from 0 to (count _units)-1 do { _arrayEnnemyUnitsDist set [_i, [leader _group distance (_units select _i), _units select _i]]; }; _arrayEnnemyUnitsDist sort true; _unit = (_arrayEnnemyUnitsDist select 0) select 1; //// _positions = [_tower] call BIS_fnc_buildingPositions; // list building positions // get the nearest pos of the nearest ennemy unit _arrayDistancePos = []; for "_i" from 0 to (count _positions)-1 do { _pos = _positions select _i; _dist = _pos distance _unit; _arrayDistancePos set [_i, [_dist,_pos]]; }; _arrayDistancePos sort true; // give units wps in building if ({alive _x} count units _group > 1) then { // get the nearest friendly unit from the pos _aliveUnits = []; {if (alive _x) then {_aliveUnits = _aliveUnits + [_x]}} forEach units _group - [leader _group]; _arrayAliveUnitsDist = []; _position = (_arrayDistancePos select 0) select 1; systemChat str _position; // TEST !!! for "_i" from 0 to (count _aliveUnits)-1 do { _arrayAliveUnitsDist set [_i, [(_aliveUnits select _i) distance _position, _aliveUnits select _i]]; }; _arrayAliveUnitsDist sort true; //// for "_i" from 0 to (count _aliveUnits)-1 do { ((_arrayAliveUnitsDist select _i) select 1) doMove ((_arrayDistancePos select _i) select 1); }; } else { _position = (_arrayDistancePos select 0) select 1; leader _group move _position; }; {_group reveal _x} forEach _units; //// _timer = [] spawn { sleep 180; }; waitUntil {{alive _x} count units _group < 1 or {alive _x} count units _towerGroup < 1 or scriptDone _timer or !alive _unit}; if ({alive _x} count units _group < 1 or {alive _x} count units _towerGroup < 1) exitWith {}; if (!alive (leader _group)) then { _unitGroup = (units _group select {alive _x}) select 0; _group selectLeader _unitGroup; systemChat str (name _unitGroup); // TEST !!! playSound "event"; // TEST !!! }; if (!isNil "timer") then {terminate _timer}; }; //systemChat "AI_CLEARBUILDING END"; // TEST if ({alive _x} count units _group > 0) then { {_x doMove getPos _tower} forEach units _group; leader _group move getPos _tower; }; while {{alive _x} count units _group > 0} do { systemChat "waiting for unitready"; if ({alive _x} count units _group == {alive _x and unitReady _x} count units _group) exitWith {systemChat "ALL UNITS READY!"; playSOund "event"}; sleep 1; }; //// if ({alive _x} count units _group > 0) then { { _x setUnitPos "AUTO"; _x doFollow leader _group; } forEach units _group; }; _group setVariable ["capturing", false]; _group enableAttack true; sleep 5; hint "END AI_CAPTURE.SQF"; // TEST !!
  16. Tips for performance: Create your functions (like FNC_Leader) only once because each time you execute the west.sqf or independent.sqf script you recreate these functions. An example: init.sqf: if (isServer) then { Orders_fnc_loadUnit = { params [["_this", objNull, [objNull]]]; switch (side _this) do{ case west: {[_this] execVM "units\west.sqf";}; case independent: {[_this] execVM "units\independent.sqf";}; }; }; FNC_Leader_West = { params ["_this"]; //Add Weapons _this addWeapon "CUP_arifle_SR3M_Vikhr"; _this addPrimaryWeaponItem "CUP_30Rnd_9x39_SP5_VIKHR_M"; _this addWeapon "CUP_hgun_Colt1911"; _this addHandgunItem "CUP_7Rnd_45ACP_1911"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add binoculars _this addWeapon "Binocular"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; _this addItemToUniform "CUP_7Rnd_45ACP_1911"; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 4 do {_this addItemToVest "CUP_30Rnd_9x39_SP5_VIKHR_M";}; for "_i" from 1 to 2 do {_this addItemToVest "CUP_7Rnd_45ACP_1911";}; _this addHeadgear "rhsgref_un_beret"; _this addGoggles "CUP_G_PMC_RadioHeadset"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Soldier_LEE_West = { params ["_this"]; //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 10 do {_this addItemToVest "CUP_10x_303_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Soldier_FAL_West = { params ["_this"]; //Add weapons _this addWeapon "CUP_arifle_FNFAL5060"; _this addPrimaryWeaponItem "CUP_20Rnd_762x51_FNFAL_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 5 do {_this addItemToVest "CUP_20Rnd_762x51_FNFAL_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Sharpshooter_West = { params ["_this"]; //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_optic_no23mk2"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 10 do {_this addItemToVest "CUP_10x_303_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Medic_West = { params ["_this"]; //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; _this addBackpack "B_TacticalPack_oli"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 8 do {_this addItemToVest "CUP_10x_303_M";}; _this addItemToBackpack "Medikit"; for "_i" from 1 to 10 do {_this addItemToBackpack "FirstAidKit";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; // Add the others functions for the independent side here, don't forget the "params ["_this"];" at the begining of all these functions }; west.sqf : params [["_this", objNull, [objNull]]]; removeAllweapons _this; removeAllItems _this; removeAllAssignedItems _this; removeUniform _this; removeVest _this; removeBackPack _this; removeHeadGear _this; removeGoggles _this; _this setSpeaker "Male05ENGB"; _this setFace selectRandom ["WhiteHead_03", "WhiteHead_14", "WhileHead_04"]; switch (typeOf _this) do { case "B_Soldier_SL_F"; case "B_Soldier_TL_F": {[_this] call FNC_Leader_west}; case "B_Soldier_F": {[_this] call selectRandom [FNC_Soldier_FAL_West, FNC_Soldier_LEE_West, FNC_Soldier_LEE_West]}; case "B_SharShooter_F": {[_this] call FNC_Sharpshooter_west}; case "B_medic_F": {[_this] call FNC_medic_West}; };
  17. For multiplayer, better use this command setUnitLoadout. And for the problem with the group leader it is because, when the switch is first declared, all the functions below the switch are not yet declared. So try do declare all the functions before the switch. params [["_this", objNull, [objNull]]]; FNC_Leader = { //Add Weapons _this addWeapon "CUP_arifle_SR3M_Vikhr"; _this addPrimaryWeaponItem "CUP_30Rnd_9x39_SP5_VIKHR_M"; _this addWeapon "CUP_hgun_Colt1911"; _this addHandgunItem "CUP_7Rnd_45ACP_1911"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add binoculars _this addWeapon "Binocular"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; _this addItemToUniform "CUP_7Rnd_45ACP_1911"; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 4 do {_this addItemToVest "CUP_30Rnd_9x39_SP5_VIKHR_M";}; for "_i" from 1 to 2 do {_this addItemToVest "CUP_7Rnd_45ACP_1911";}; _this addHeadgear "rhsgref_un_beret"; _this addGoggles "CUP_G_PMC_RadioHeadset"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Soldier_LEE = { //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 10 do {_this addItemToVest "CUP_10x_303_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Soldier_FAL = { //Add weapons _this addWeapon "CUP_arifle_FNFAL5060"; _this addPrimaryWeaponItem "CUP_20Rnd_762x51_FNFAL_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 5 do {_this addItemToVest "CUP_20Rnd_762x51_FNFAL_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Sharpshooter = { //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_optic_no23mk2"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 10 do {_this addItemToVest "CUP_10x_303_M";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; FNC_Medic = { //Add weapons _this addWeapon "CUP_srifle_LeeEnfield"; _this addPrimaryWeaponItem "CUP_10x_303_M"; //Add containers _this forceAddUniform "U_BG_Guerrilla_6_1"; _this addVest "V_HarnessO_brn"; _this addBackpack "B_TacticalPack_oli"; //Add items to containers for "_i" from 1 to 2 do {_this addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_this addItemToVest "rhs_grenade_mkii_mag";}; for "_i" from 1 to 8 do {_this addItemToVest "CUP_10x_303_M";}; _this addItemToBackpack "Medikit"; for "_i" from 1 to 10 do {_this addItemToBackpack "FirstAidKit";}; _this addHeadgear "rhsgref_un_beret"; //Add items _this linkItem "ItemMap"; _this linkItem "ItemCompass"; _this linkItem "ItemWatch"; }; removeAllWeapons _this; removeAllItems _this; removeAllAssignedItems _this; removeUniform _this; removeVest _this; removeBackpack _this; removeHeadgear _this; removeGoggles _this; _this setSpeaker "Male05ENGB"; _this setFace selectRandom ["WhiteHead_03", "WhiteHead_14", "WhiteHead_04"]; switch (typeOf _this) do{ case "B_Soldier_SL_F"; case "B_Soldier_TL_F": {call FNC_Leader;}; case "B_Soldier_F": {call selectRandom [FNC_Soldier_FAL, FNC_Soldier_LEE, FNC_Soldier_LEE];}; case "B_Sharpshooter_F": {call FNC_Sharpshooter;}; case "B_medic_F": {call FNC_Medic;}; }; exit;
  18. Yes you need to use html tags in your string to change the text color.
  19. Crazy_Man

    Camera

    You can make a loop that attach the player to the camera. It's bad coding but for now that do the trick. fn_cameraOld = { //--- Classic camera script, enhanced by Karel Moricky, 2010/03/19 if (!isNil "BIS_DEBUG_CAM") exitwith {}; //--- Is FLIR available if (isnil "BIS_DEBUG_CAM_ISFLIR") then { BIS_DEBUG_CAM_ISFLIR = isclass (configfile >> "cfgpatches" >> "A3_Data_F"); }; BIS_DEBUG_CAM_MAP = false; BIS_DEBUG_CAM_VISION = 0; BIS_DEBUG_CAM_FOCUS = 0; BIS_DEBUG_CAM_COLOR = ppEffectCreate ["colorCorrections", 1600]; if (isnil "BIS_DEBUG_CAM_PPEFFECTS") then { BIS_DEBUG_CAM_PPEFFECTS = [ [1, 1, -0.01, [1.0, 0.6, 0.0, 0.005], [1.0, 0.96, 0.66, 0.55], [0.95, 0.95, 0.95, 0.0]], [1, 1.02, -0.005, [0.0, 0.0, 0.0, 0.0], [1, 0.8, 0.6, 0.65], [0.199, 0.587, 0.114, 0.0]], [1, 1.15, 0, [0.0, 0.0, 0.0, 0.0], [0.5, 0.8, 1, 0.5], [0.199, 0.587, 0.114, 0.0]], [1, 1.06, -0.01, [0.0, 0.0, 0.0, 0.0], [0.44, 0.26, 0.078, 0], [0.199, 0.587, 0.114, 0.0]] ]; }; //--- Undefined if (typename _this != typename objnull) then {_this = cameraon}; setacctime (acctime max (1 / 128)); //--- Camera cannot run when acctime is 0 private ["_ppos", "_pX", "_pY"]; _ppos = getPosATL _this; _pX = _ppos select 0; _pY = _ppos select 1; _pZ = _ppos select 2; _pHeight = getTerrainHeightASL [_pX, _pY]; if (_pHeight < 0) then {_pZ = _pZ + _pHeight}; private ["_local"]; _local = "camera" camCreate [_pX, _pY, _pZ + 2]; BIS_DEBUG_CAM = _local; _local camCommand "MANUAL ON"; _local camCommand "INERTIA OFF"; _local cameraEffect ["INTERNAL", "BACK"]; //// [_this, _local] spawn { params ["_player", "_camera"]; while {!isNull _camera} do { _player attachTo [_camera, [0,0,1]]; sleep 0.1; }; }; //// showCinemaBorder false; BIS_DEBUG_CAM setDir direction (vehicle player); //--- Marker BIS_DEBUG_CAM_MARKER = createmarkerlocal ["BIS_DEBUG_CAM_MARKER",_ppos]; BIS_DEBUG_CAM_MARKER setmarkertypelocal "mil_start"; BIS_DEBUG_CAM_MARKER setmarkercolorlocal "colorpink"; BIS_DEBUG_CAM_MARKER setmarkersizelocal [.75,.75]; BIS_DEBUG_CAM_MARKER setmarkertextlocal "BIS_DEBUG_CAM"; //--- Key Down _keyDown = (finddisplay 46) displayaddeventhandler ["keydown"," _key = _this select 1; _ctrl = _this select 3; if (_key in (actionkeys 'nightvision')) then { BIS_DEBUG_CAM_VISION = BIS_DEBUG_CAM_VISION + 1; if (BIS_DEBUG_CAM_ISFLIR) then { _vision = BIS_DEBUG_CAM_VISION % 4; switch (_vision) do { case 0: { camusenvg false; call compile 'false SetCamUseTi 0'; }; case 1: { camusenvg true; call compile 'false SetCamUseTi 0'; }; case 2: { camusenvg false; call compile 'true SetCamUseTi 0'; }; case 3: { camusenvg false; call compile 'true SetCamUseTi 1'; }; }; } else { _vision = BIS_DEBUG_CAM_VISION % 2; switch (_vision) do { case 0: { camusenvg false; }; case 1: { camusenvg true; }; }; }; }; if (_key in (actionkeys 'showmap')) then { if (BIS_DEBUG_CAM_MAP) then { openmap [false,false]; BIS_DEBUG_CAM_MAP = false; } else { openmap [true,true]; BIS_DEBUG_CAM_MAP = true; BIS_DEBUG_CAM_MARKER setmarkerposlocal position BIS_DEBUG_CAM; BIS_DEBUG_CAM_MARKER setmarkerdirlocal direction BIS_DEBUG_CAM; mapanimadd [0,0.1,position BIS_DEBUG_CAM]; mapanimcommit; }; }; if (_key == 55) then { _worldpos = screentoworld [.5,.5]; if (_ctrl) then { vehicle player setpos _worldpos; } else { copytoclipboard str _worldpos; }; }; if (_key == 83 && !isnil 'BIS_DEBUG_CAM_LASTPOS') then { BIS_DEBUG_CAM setpos BIS_DEBUG_CAM_LASTPOS; }; if (_key == 41) then { BIS_DEBUG_CAM_COLOR ppeffectenable false; }; if (_key >= 2 && _key <= 11) then { _id = _key - 2; if (_id < count BIS_DEBUG_CAM_PPEFFECTS) then { BIS_DEBUG_CAM_COLOR ppEffectAdjust (BIS_DEBUG_CAM_PPEFFECTS select _id); BIS_DEBUG_CAM_COLOR ppEffectCommit 0; BIS_DEBUG_CAM_COLOR ppeffectenable true; }; }; "]; //--- Mouse wheel moving _mousezchanged = (finddisplay 46) displayaddeventhandler ["mousezchanged"," _n = _this select 1; BIS_DEBUG_CAM_FOCUS = BIS_DEBUG_CAM_FOCUS + _n/10; if (_n > 0 && BIS_DEBUG_CAM_FOCUS < 0) then {BIS_DEBUG_CAM_FOCUS = 0}; if (BIS_DEBUG_CAM_FOCUS < 0) then {BIS_DEBUG_CAM_FOCUS = -1}; BIS_DEBUG_CAM camcommand 'manual off'; BIS_DEBUG_CAM campreparefocus [BIS_DEBUG_CAM_FOCUS,1]; BIS_DEBUG_CAM camcommitprepared 0; BIS_DEBUG_CAM camcommand 'manual on'; "]; _map_mousebuttonclick = ((finddisplay 12) displayctrl 51) ctrladdeventhandler ["mousebuttonclick"," _button = _this select 1; _ctrl = _this select 5; if (_button == 0) then { _x = _this select 2; _y = _this select 3; _worldpos = (_this select 0) posscreentoworld [_x,_y]; if (_ctrl) then { _veh = vehicle player; _veh setpos [_worldpos select 0,_worldpos select 1,position _veh select 2]; } else { BIS_DEBUG_CAM setpos [_worldpos select 0,_worldpos select 1,position BIS_DEBUG_CAM select 2]; BIS_DEBUG_CAM_MARKER setmarkerposlocal _worldpos; }; }; "]; //Wait until destroy is forced or camera auto-destroyed. [_local,_keyDown,_mousezchanged,_map_mousebuttonclick] spawn { private ["_local","_keyDown","_mousezchanged","_map_mousebuttonclick","_lastpos"]; _local = _this select 0; _keyDown = _this select 1; _mousezchanged = _this select 2; _map_mousebuttonclick = _this select 3; waituntil { if (!isnull BIS_DEBUG_CAM) then {_lastpos = position BIS_DEBUG_CAM}; isNull BIS_DEBUG_CAM }; player cameraEffect ["TERMINATE", "BACK"]; deletemarkerlocal BIS_DEBUG_CAM_MARKER; BIS_DEBUG_CAM = nil; BIS_DEBUG_CAM_MAP = nil; BIS_DEBUG_CAM_MARKER = nil; BIS_DEBUG_CAM_VISION = nil; camDestroy _local; BIS_DEBUG_CAM_LASTPOS = _lastpos; ppeffectdestroy BIS_DEBUG_CAM_COLOR; (finddisplay 46) displayremoveeventhandler ["keydown",_keyDown]; (finddisplay 46) displayremoveeventhandler ["mousezchanged",_mousezchanged]; ((finddisplay 12) displayctrl 51) ctrlremoveeventhandler ["mousebuttonclick",_map_mousebuttonclick]; }; };
  20. Take a hand on it, you won't be disappointed! Multiplayer Scripting
  21. If you don't use respawn you can use a global variable for the position. initServer.sqf : startPosition = ["bluemarkername", 1, 3, 2, 0, 45, 0, "redmarkername"] call BIS_fnc_findSafePos; publicVariable "startPosition"; initPlayerLocal.sqf : waitUntil {!isNull player}; player setPos startPosition;
  22. My bad, i misunderstood your question. Maybe this post can help you: https://www.reddit.com/r/armadev/comments/a1spaw/how_to_make_specific_face_for_unit_via_configcpp/
  23. Do you want to create your unit with Zeus or by script?
  24. waitUntil {!isNull player}; _randomPos = [["blueMarkerName"], ["water", "redMarkerName"]] call BIS_fnc_randomPos; {_x setPos _randomPos} forEach units group player; or BIS_fnc_findSafePos like Harzach says
  25. Here is an example of a code that could do the trick. But it will affect even the OpFor units placed in the editor or spawned differently than Zeus. In the init.sqf: if (isServer) then { [] spawn { while {true} do { { if (side _x == east && {!(_x getVariable ["withCustomIdentity", false])}) then { _x setVariable ["withCustomIdentity", true]; [_x, "yourCustomIdentity"] remoteExecCall ["setIdentity" , 0, true]; // change "yourCustomIdentity" by the identity you want }; } forEach allUnits; sleep 5; }; }; }; EDIT : I've change the JIP option to true for the remoteExecCall command so that JIP players has the setIdentity too.
×