Jump to content

sabot10.5mm

Member
  • Content Count

    124
  • Joined

  • Last visited

  • Medals

Everything posted by sabot10.5mm

  1. sabot10.5mm

    [solved] script syntax help

    _myGroup = group player; //_RanNum = ""; _position = getPos player; _nearLoc = nearestLocations [position player, ["NameCity","FlatAreaCity"], 100]; _enyTnk = [getPos _position, side EAST] (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Armored" >> "OIA_TankSection") _enyTrp = [getPos _position, EAST, 5] call BIS_fnc_spawnGroup hint format ["city %1",_nearloc]; sleep 2; while {true} { //_RanNum = floor random 10; if (!(count _nearLoc == 0)) then {if (floor random 5 == 0) then {selectrandom [_enRanTr,_enRanTk]};}; sleep 5; }; then {if (floor random 5 == 0) then {selectrandom [_enRanTr,_enRanTk]};}; ^will this code be the same as just writing the code then {if (floor random 5 == 0) then {[getPos _position, EAST, 5] call BIS_fnc_spawnGroup]};}; or is select random just selecting the variable and doing nothing with it?
  2. thanks this help me understand functions better.. i know there is the wiki page, but their examples are lacking for a lot of function commands and even sqf commands.
  3. this script spawns soldiers on a marker named s1 and it works well, but there are a few things i would like to do to keep the action going. for instance my current respawn script only works by waiting until the group count gets to 3, and the respawns the entire group. kind of stuck here on this idea of respawning individual ai killed instead of waiting for most of group the to be killed before respawning an entire group. any help appreciated
  4. could you comment each command on your script to make it easy to understand?
  5. Thanks I will look into this.. is it ok to have 50 EHs? Silly question.... for some
  6. sabot10.5mm

    Spawn wreck without explosion

    are you trying to create husks of vehicles before the mission starts? or does this happen after the games starts? if you spawn the vehicles and destroy them at missions start, you could start the mission faded to black and sound muted to give the game time to spawn and set damage on the vehicles.
  7. sabot10.5mm

    AI Spawn Script Pack

    found a slight bug, where if you call heliparadrop sometimes it uses the heli drone which just crashes or the blackfoot which looks odd. on a second note - armed choppers of that same script shoot at enemy, which may be unwanted for some. quick fix was to just delete the unwanted choppers in the config_assip.hpp file
  8. sabot10.5mm

    AI Spawn Script Pack

    anyway to get ai to get in turrets? what do you put in the custom init to get them to do this? also is there a way to get the heliparadrop chopper to 3dsay a song?
  9. sabot10.5mm

    Logic Entites documentation

    It is explained here
  10. i call it from an action on a button ok action = "call fn_commitWeather;"; call |#|fn_commitWeather undefined expression in varible i dont understand why i cant get this to work? Dialogs.hpp class nevDebugMenu { duration = 99999; idd = 80000; onLoad = "call fn_onLoad"; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Gary, v1.063, #Goqyvo) //////////////////////////////////////////////////////// class RscFrameF: RscFrame { idc = 1801; text = "Weather Dialog"; //--- ToDo: Localize; x = 0.422676 * safezoneW + safezoneX; y = 0.346018 * safezoneH + safezoneY; w = 0.154647 * safezoneW; h = 0.329962 * safezoneH; }; class RscButtonOK: RscButton { idc = 1600; text = "OK"; //--- ToDo: Localize; x = 0.427831 * safezoneW + safezoneX; y = 0.620986 * safezoneH + safezoneY; w = 0.056704 * safezoneW; h = 0.0329962 * safezoneH; action = "call fn_commitWeather;"; tooltip = "Commit to changes"; //--- ToDo: Localize; }; class RscButtonCnl: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 0.509392 * safezoneW + safezoneX; y = 0.622018 * safezoneH + safezoneY; w = 0.056704 * safezoneW; h = 0.0329962 * safezoneH; tooltip = "Cancel to changes"; //--- ToDo: Localize; }; class RscSliderOst: RscSlider { idc = 1900; x = 0.427831 * safezoneW + safezoneX; y = 0.368015 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change overcast"; //--- ToDo: Localize; }; class RscSliderLght: RscSlider { idc = 1901; x = 0.427831 * safezoneW + safezoneX; y = 0.401012 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Lightning"; //--- ToDo: Localize; }; class RscSliderFog: RscSlider { idc = 1902; x = 0.427831 * safezoneW + safezoneX; y = 0.434008 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Fog"; //--- ToDo: Localize; }; class RscsliderFogD: RscSlider { idc = 1903; x = 0.427831 * safezoneW + safezoneX; y = 0.467004 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Fog Decay"; //--- ToDo: Localize; }; class RscSliderFogB: RscSlider { idc = 1904; x = 0.427831 * safezoneW + safezoneX; y = 0.5 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Fog Base"; //--- ToDo: Localize; }; class RscSliderRain: RscSlider { idc = 1905; x = 0.427831 * safezoneW + safezoneX; y = 0.532996 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Rain"; //--- ToDo: Localize; }; class RscSliderWaves: RscSlider { idc = 1906; x = 0.427831 * safezoneW + safezoneX; y = 0.565992 * safezoneH + safezoneY; w = 0.144337 * safezoneW; h = 0.0219974 * safezoneH; tooltip = "Change Waves"; //--- ToDo: Localize; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; fn_commitWeather fn_commitWeather = { // Overcast _overcast = sliderPosition 1900; 0 setOvercast _overcast; // Lightnings _lightning = sliderPosition 1901; 0 setLightnings _lightning; // Fog _fogValue = sliderPosition 1902; _fogDecay = sliderPosition 1903; _fogBase = sliderPosition 1904; 0 setFog [_fogValue, _fogDecay, _fogBase]; // Rain _rain = sliderPosition 1905; 0 setRain _rain; // Waves _waves = sliderPosition 1906; 0 setWaves _waves; forceWeatherChange; } fn_onload fn_onLoad = { _dialog = _this select 0; // Overcast slider _overcastSlider = _dialog displayCtrl 1900; _overcastSlider sliderSetRange [0, 1]; _overcastSlider sliderSetPosition overcast; // Lightnings slider _lightningSlider = _dialog displayCtrl 1901; _lightningSlider sliderSetRange [0, 1]; _lightningSlider sliderSetPosition lightnings; // Fog value slider _fogValueSlider = _dialog displayCtrl 1902; _fogValueSlider sliderSetRange [0, 1]; _fogValueSlider sliderSetPosition (fogParams select 0); // Fog decay slider _fogDecaySlider = _dialog displayCtrl 1903; _fogDecaySlider sliderSetRange [0, 1]; _fogDecaySlider sliderSetPosition (fogParams select 1); // Fog base slider _fogBaseSlider = _dialog displayCtrl 1904; _fogBaseSlider sliderSetRange [0, 1]; _fogBaseSlider sliderSetPosition (fogParams select 2); // Rain slider _rainSlider = _dialog displayCtrl 1905; _rainSlider sliderSetRange [0, 1]; _rainSlider sliderSetPosition rain; // Waves slider _wavesSlider = _dialog displayCtrl 1906; _wavesSlider sliderSetRange [0, 1]; _wavesSlider sliderSetPosition waves; } functions.hpp class gary { tag = "gary"; class functions { file = "functions"; class commitWeather {}; class onload {}; }; };
  11. is their a way to manipulate skiptime using a slider or is setdate the only way? would this work? edit yes it works! fn_onLoad = { _dialog = _this select 0; // time slider _timeSlider = _dialog displayCtrl 1907; _timeSlider sliderSetRange [0, 23]; _timeSlider sliderSetPosition daytime; }; fn_commitWeather = { // time _time = sliderPosition 1907; skipTime _time; };
  12. functions.hpp class gary { tag = "gary"; class functions { file = "functions"; class commitWeather { preInit = 0; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"] postInit = 1; //1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit", didJIP] preStart = 0; //1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only) ext = ".sqf"; //Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf". headerType = -1; //Set function header type: -1 - no header; 0 - default header; 1 - system header. recompile = 0; //1 to recompile the function upon mission start (config.cpp only; functions in description.ext are compiled upon mission start already) }; class onload { preInit = 0; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"] postInit = 1; //1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit", didJIP] preStart = 0; //1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only) ext = ".sqf"; //Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf". headerType = -1; //Set function header type: -1 - no header; 0 - default header; 1 - system header. recompile = 0; //1 to recompile the function upon mission start (config.cpp only; functions in description.ext are compiled upon mission start already) }; }; };
  13. this was the first time using functions so it took me a while to figure out how to define functions. inside my functions.hpp class gary { tag = "gary"; class functions { file = "functions"; class commitWeather { preInit = 0; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"] postInit = 1; //1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit", didJIP] preStart = 0; //1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only) ext = ".sqf"; //Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf". headerType = -1; //Set function header type: -1 - no header; 0 - default header; 1 - system header. recompile = 0; //1 to recompile the function upon mission start (config.cpp only; functions in description.ext are compiled upon mission start already) }; class onload { preInit = 0; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"] postInit = 1; //1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit", didJIP] preStart = 0; //1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only) ext = ".sqf"; //Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf". headerType = -1; //Set function header type: -1 - no header; 0 - default header; 1 - system header. recompile = 0; //1 to recompile the function upon mission start (config.cpp only; functions in description.ext are compiled upon mission start already) }; }; };
  14. _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay = _soundPath + "sounds\some_sound_file.ogg"; playSound3D [_soundToPlay, _sourceObject, false, getPos _sourceObject, 10, 1, 50]; //Volume db+10, volume drops off to 0 at 50 meters from _sourceObject i hope this helps. Plays positional sound with given filename on every computer on network.
  15. sabot10.5mm

    Enemy occupation system (eos)

    i dont think eos would be what you want, since it spawns ai on a marker and caches the ai when you leave the area. i think you want the script made by spunfin militarize script or which ever one. http://steamcommunity.com/sharedfiles/filedetails/?id=905524040 you can check out my mission of koth if you want. you could also download the pboviewer and extract the mission files to view it in the editor
  16. i did it woo {_actCond="{vehicle _x in thisList && isplayer _x || (((player == UAVControl uav3 select 0) && (isplayer _x) or (player == UAVControl uav2 select 0) && (isplayer _x)) && ({_x in thislist} count [uav, uav1, uav2, uav3] >= 1))} count allUnits > 0"; Hint "done";};};
  17. my mission uses player controlled vehicles to spawn ai when inside a trigger, but i cant for the life of me get more then one uav vehicle to fire a trigger. this is the code im in need of help with. {_actCond="{vehicle _x in thisList && isplayer _x || ((player == UAVControl uav select 0) || (player == UAVControl uav2 select 0) && (isplayer _x) && (uav in thisList || uav2 in thisList))} count allUnits > 0"; Hint "done";};}; here is the whole script from EOS if (!isServer) exitWith {}; private ["_newpos","_cargoType","_vehType","_dGrp","_mkrAgl","_side","_bGroup","_civZone","_fGrp","_fSize","_fGrps","_eGrp","_eGrps","_dGrps","_aMin","_aSize","_aGrps","_aGrp","_bMin","_units","_bSize","_bGrps","_bGrp","_trig","_cache","_grp","_crew","_vehicle","_actCond","_mAN","_mAH","_distance","_mA","_settings","_cGrp","_cSize","_cGrps","_taken","_clear","_enemyFaction","_faction","_n","_eosAct","_eosActivated","_debug","_mkr","_mPos","_mkrX","_mkrY"]; _mkr=(_this select 0);_mPos=markerpos(_this select 0); _mkrX=getMarkerSize _mkr select 0; _mkrY=getMarkerSize _mkr select 1; _mkrAgl=markerDir _mkr; _a=(_this select 1);_aGrps=_a select 0;_aSize=_a select 1;_aMin=_aSize select 0; _b=(_this select 2);_bGrps=_b select 0;_bSize=_b select 1;_bMin=_bSize select 0; _c=(_this select 3);_cGrps=_c select 0;_cSize=_c select 1; _d=(_this select 4);_dGrps=_d select 0;_eGrps=_d select 1;_fGrps=_d select 2;_fSize=_d select 3; _settings=(_this select 5);_faction=_settings select 0;_mA=_settings select 1;_distance=_settings select 2;_side=_settings select 3; _heightLimit=if (count _settings > 4) then {_settings select 4} else {false}; _debug=if (count _settings > 5) then {_settings select 5} else {false}; _cache= if (count _this > 6) then {_this select 6} else {false}; if (_side==EAST) then {_enemyFaction="east";_civZone=false;}; if (_side==WEST) then {_enemyFaction="west";_civZone=false;}; if (_side==INDEPENDENT) then {_enemyFaction="guer";_civZone=false;}; if (_side==CIVILIAN) then {_enemyFaction="civ";_civZone=true;}; if (_mA==0) then {_mAH = 1;_mAN = 0.5;}; if (_mA==1) then {_mAH = 0;_mAN = 0;}; if (_mA==2) then {_mAH = 0.5;_mAN = 0.5;}; // INITIATE ZONE _trig=format ["EOSTrigger%1",_mkr]; if (!_cache) then { if ismultiplayer then { if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count playableunits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x} count playableunits > 0"; };}else{ if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5 } count allUnits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x || ((player == UAVControl uav select 0) || (player == UAVControl uav2 select 0) && (isplayer _x) && (uav in thisList || uav2 in thisList))} count allUnits > 0"; Hint "done";};}; _eosActivated = createTrigger ["EmptyDetector",_mPos]; _eosActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE]; _eosActivated setTriggerActivation ["ANY","PRESENT",true]; _eosActivated setTriggerTimeout [1, 1, 1, true]; _eosActivated setTriggerStatements [_actCond,"",""]; server setvariable [_trig,_eosActivated]; }else{ _eosActivated=server getvariable _trig; }; _mkr setmarkerAlpha _mAN; if (!(getmarkercolor _mkr == VictoryColor)) then //IF MARKER IS GREEN DO NOT CHANGE COLOUR { _mkr setmarkercolor hostileColor; }; waituntil {triggeractivated _eosActivated}; //WAIT UNTIL PLAYERS IN ZONE if (!(getmarkercolor _mkr == "colorblack"))then { if (!(getmarkercolor _mkr == VictoryColor)) then {_mkr setmarkerAlpha _mAH;}; // SPAWN HOUSE PATROLS for "_counter" from 1 to _aGrps do { if (isnil "_aGrp") then {_aGrp=[];}; if (_cache) then { _cacheGrp=format ["HP%1",_counter]; _units=_eosActivated getvariable _cacheGrp; _aSize=[_units,_units]; _aMin=_aSize select 0; if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];}; }; if (_aMin > 0) then { _aGroup=[_mPos,_aSize,_faction,_side] call EOS_fnc_spawngroup; if (!surfaceiswater _mPos) then { 0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse; }else{ 0 = [_aGroup,_mkr] call EOS_fnc_taskpatrol; }; _aGrp set [count _aGrp,_aGroup]; 0=[_aGroup,"INFskill"] call eos_fnc_grouphandlers; if (_debug) then {PLAYER SIDECHAT (format ["Spawned House Patrol: %1",_counter]);0= [_mkr,_counter,"House Patrol",getpos (leader _aGroup)] call EOS_debug}; }; }; // SPAWN PATROLS for "_counter" from 1 to _bGrps do { if (isnil "_bGrp") then {_bGrp=[];}; if (_cache) then { _cacheGrp=format ["PA%1",_counter]; _units=_eosActivated getvariable _cacheGrp; _bSize=[_units,_units]; _bMin=_bSize select 0; if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];}; }; if (_bMin > 0) then { _pos = [_mkr,true] call SHK_pos; _bGroup=[_pos,_bSize,_faction,_side] call EOS_fnc_spawngroup; 0 = [_bGroup,_mkr] call EOS_fnc_taskpatrol; _bGrp set [count _bGrp,_bGroup]; 0=[_bGroup,"INFskill"] call eos_fnc_grouphandlers; if (_debug) then {PLAYER SIDECHAT (format ["Spawned Patrol: %1",_counter]);0= [_mkr,_counter,"patrol",getpos (leader _bGroup)] call EOS_debug}; }; }; //SPAWN LIGHT VEHICLES for "_counter" from 1 to _cGrps do { if (isnil "_cGrp") then {_cGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; if (surfaceiswater _newpos) then {_vehType=8;_cargoType=10;}else{_vehType=7;_cargoType=9;}; _cGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle; if ((_cSize select 0) > 0) then{ 0=[(_cGroup select 0),_cSize,(_cGroup select 2),_faction,_cargoType] call eos_fnc_setcargo; }; 0=[(_cGroup select 2),"LIGskill"] call eos_fnc_grouphandlers; 0 = [(_cGroup select 2),_mkr] call EOS_fnc_taskpatrol; _cGrp set [count _cGrp,_cGroup]; if (_debug) then {player sidechat format ["Light Vehicle:%1 - r%2",_counter,_cGrps];0= [_mkr,_counter,"Light Veh",(getpos leader (_cGroup select 2))] call EOS_debug}; }; //SPAWN ARMOURED VEHICLES for "_counter" from 1 to _dGrps do { if (isnil "_dGrp") then {_dGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; if (surfaceiswater _newpos) then {_vehType=8;}else{_vehType=2;}; _dGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle; 0=[(_dGroup select 2),"ARMskill"] call eos_fnc_grouphandlers; 0 = [(_dGroup select 2),_mkr] call EOS_fnc_taskpatrol; _dGrp set [count _dGrp,_dGroup]; if (_debug) then {player sidechat format ["Armoured:%1 - r%2",_counter,_dGrps];0= [_mkr,_counter,"Armour",(getpos leader (_dGroup select 2))] call EOS_debug}; }; //SPAWN STATIC PLACEMENTS for "_counter" from 1 to _eGrps do { if (surfaceiswater _mPos) exitwith {}; if (isnil "_eGrp") then {_eGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; _eGroup=[_newpos,_side,_faction,5]call EOS_fnc_spawnvehicle; 0=[(_eGroup select 2),"STAskill"] call eos_fnc_grouphandlers; _eGrp set [count _eGrp,_eGroup]; if (_debug) then {player sidechat format ["Static:%1",_counter];0= [_mkr,_counter,"Static",(getpos leader (_eGroup select 2))] call EOS_debug}; }; //SPAWN CHOPPER for "_counter" from 1 to _fGrps do { if (isnil "_fGrp") then {_fGrp=[];}; if ((_fSize select 0) > 0) then {_vehType=4}else{_vehType=3}; _newpos = [(markerpos _mkr), 1500, random 360] call BIS_fnc_relPos; _fGroup=[_newpos,_side,_faction,_vehType,"fly"]call EOS_fnc_spawnvehicle; _fGrp set [count _fGrp,_fGroup]; if ((_fSize select 0) > 0) then { _cargoGrp = createGroup _side; 0=[(_fGroup select 0),_fSize,_cargoGrp,_faction,9] call eos_fnc_setcargo; 0=[_cargoGrp,"INFskill"] call eos_fnc_grouphandlers; _fGroup set [count _fGroup,_cargoGrp]; null = [_mkr,_fGroup,_counter] execvm "eos\functions\TransportUnload_fnc.sqf"; }else{ _wp1 = (_fGroup select 2) addWaypoint [(markerpos _mkr), 0]; _wp1 setWaypointSpeed "FULL"; _wp1 setWaypointType "SAD";}; 0=[(_fGroup select 2),"AIRskill"] call eos_fnc_grouphandlers; if (_debug) then {player sidechat format ["Chopper:%1",_counter];0= [_mkr,_counter,"Chopper",(getpos leader (_fGroup select 2))] call EOS_debug}; }; //SPAWN ALT TRIGGERS _clear = createTrigger ["EmptyDetector",_mPos]; _clear setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE]; _clear setTriggerActivation [_enemyFaction,"NOT PRESENT",true]; _clear setTriggerStatements ["this","",""]; _taken = createTrigger ["EmptyDetector",_mPos]; _taken setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE]; _taken setTriggerActivation ["ANY","PRESENT",true]; _taken setTriggerStatements ["{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count allUnits > 0","",""]; _eosAct=true; while {_eosAct} do { // IF PLAYER LEAVES THE AREA OR ZONE DEACTIVATED if (!triggeractivated _eosActivated || getmarkercolor _mkr == "colorblack") exitwith { if (_debug) then {if (!(getmarkercolor _mkr == "colorblack")) then {hint "Restarting Zone AND deleting units";}else{hint "EOS zone deactivated";};}; //CACHE LIGHT VEHICLES if (!isnil "_cGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then { _cGrps= _cGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _cGrp; if (_debug) then {player sidechat format ["ID:c%1",_cGrps];};}; // CACHE ARMOURED VEHICLES if (!isnil "_dGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then {_dGrps= _dGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _dGrp; if (_debug) then {player sidechat format ["ID:c%1",_dGrps];};}; // CACHE PATROL INFANTRY if (!isnil "_bGrp") then { _n=0; { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["PA%1",_n]; if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];}; _eosActivated setvariable [_cacheGrp,_units]; {deleteVehicle _x} foreach units _x;deleteGroup _x; }foreach _bGrp; }; // CACHE HOUSE INFANTRY if (!isnil "_aGrp") then { _n=0; { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["HP%1",_n]; if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];}; _eosActivated setvariable [_cacheGrp,_units]; {deleteVehicle _x} foreach units _x;deleteGroup _x; }foreach _aGrp; }; // CACHE MORTARS if (!isnil "_eGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then {_eGrps= _eGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _eGrp;}; // CACHE HELICOPTER TRANSPORT if (!isnil "_fGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; _cargoGrp = _x select 3; if (!alive _vehicle || {!alive _x} foreach _crew) then {_fGrps= _fGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; if (!isnil "_cargoGrp") then { {deleteVehicle _x} foreach units _cargoGrp;deleteGroup _cargoGrp;}; }foreach _fGrp;}; _eosAct=false; if (_debug) then {hint "Zone Cached";}; }; if (triggeractivated _clear and triggeractivated _taken and !_civZone)exitwith {// IF ZONE CAPTURED BEGIN CHECKING FOR ENEMIES _cGrps=0;_aGrps=0;_bGrps=0;_dGrps=0;_eGrps=0;_fGrps=0; while {triggeractivated _eosActivated AND !(getmarkercolor _mkr == "colorblack")} do { if (!triggeractivated _clear) then { _mkr setmarkercolor hostileColor; _mkr setmarkerAlpha _mAH; if (_debug) then {hint "Zone Lost";}; }else{ _mkr setmarkercolor VictoryColor; _mkr setmarkerAlpha _mAN; if (_debug) then {hint "Zone Captured";}; }; sleep 1;}; // PLAYER LEFT ZONE _eosAct=false; };sleep 0.5;}; deletevehicle _clear;deletevehicle _taken; if (!(getmarkercolor _mkr == "colorblack")) then { null = [_mkr,[_aGrps,_aSize],[_bGrps,_bSize],[_cGrps,_cSize],[_dGrps,_eGrps,_fGrps,_fSize],_settings,true] execVM "eos\core\eos_core.sqf"; }else{_Mkr setmarkeralpha 0;}; };
  18. if (!_cache) then { if ismultiplayer then { if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count playableunits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x} count playableunits > 0"; };}else{ if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5 } count allUnits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x || ((player == UAVControl uav select 0) || (player == UAVControl uav2 select 0) && (isplayer _x) && (uav in thisList || uav2 in thisList))} count allUnits > 0"; Hint "done";};}; _eosActivated = createTrigger ["EmptyDetector",_mPos]; _eosActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE]; _eosActivated setTriggerActivation ["ANY","PRESENT",true]; _eosActivated setTriggerTimeout [1, 1, 1, true]; _eosActivated setTriggerStatements [_actCond,"",""]; im only guessing it makes a trigger. im still pretty new to scripting, and using the wiki to try and make this work but i cant.
  19. im happy with this. it first waits for the group to be created and moves on from there.. thanks you for that waitUntil {sleep 1; !isnil "LVGroup7"}; _Count = {alive _x} count units LVgroup7; //that same math again //_Limit = round(_Count * .20); while{true}do{ //infinite loop _Count = {alive _x} count units LVgroup7; //update alive count on each time this loops if(_Count <= 4)then{ //if less than 30%, create new instance of reinforcementChopper with same ID (8) hint "Airbourne reinforcements incoming"; nul = ["myMarker3",1,true,false,1000,245,true,200,150,15,0.5,50,false,false,false,true,["myMarker2","myMarker5","myMarker6","myMarker7","myMarker8",250],true,"default",nil,nil,7,false] execVM "LV\heliParadrop.sqf"; waitUntil{sleep 1; ({alive _x} count units LVgroup7)>5}; //to be safe, let's again wait for units to spawn before script continues }; sleep 4; //loops in 4s cycle };
  20. this script counts units from LVgroup7 on script start, i tried... but lvgroup isnt a variable and i do not know how to get it to wait till they spawn before counting. waitUntil { {alive _x} count (units LVgroup) == 0 }; _Count = {alive _x} count units LVgroup7; //that same math again _Limit = round(_Count * .20); while{true}do{ //infinite loop _Count = {alive _x} count units LVgroup7; //update alive count on each time this loops if(_Count <= _Limit)then{ //if less than 30%, create new instance of reinforcementChopper with same ID (8) hint "Airbourne reinforcements incoming"; nul = ["myMarker3",1,true,false,1000,245,true,200,150,15,0.5,50,false,false,false,true,["myMarker2","myMarker5","myMarker6","myMarker7","myMarker8",250],true,"default",nil,nil,7,false] execVM "LV\heliParadrop.sqf"; waitUntil{sleep 1; ({alive _x} count units LVgroup7)>_Limit}; //to be safe, let's again wait for units to spawn before script continues }; sleep 60; //loops in 4s cycle }; sleep 1;
  21. i tried this [] spawn { } caused the script to not funtion at all, taking out that command made it run but hint "works 3'; never fires. its like the while command doesnt work? [] spawn { waitUntil {sleep 1; !isnil "LVGroup7"}; hint "works 1"; sleep 5; _LVgrp7cnt = count units LVGroup7; hint "works 2"; while {true} do { hint "works 3"; sleep 3; waitUntil {sleep 1; count units LVGroup7 > (_LVgrp7cnt *0.3)}; { //if less than 30%, create new instance of reinforcementChopper with same ID (8) hint "Airbourne reinforcements incoming"; nul = ["myMarker3",1,true,false,1000,245,true,200,150,15,0.5,50,false,false,false,true,["myMarker2","myMarker5","myMarker6","myMarker7","myMarker8",250],true,"default",nil,nil,7,false] execVM "LV\heliParadrop.sqf"; };};
  22. this script by killzonekid is great and all, but it waits for the bullet to be null which can take forever if you miss your intended target. my question is how can i speed up the wait time so its not so long, like maybe a max flight timer or quit on mouse click player addEventHandler ["Fired", { if (!(player getVariable ["BulletCam", false])) exitWith {}; _null = _this spawn { _missile = _this select 6; _cam = "camera" camCreate (position player); _cam cameraEffect ["External", "Back"]; waitUntil { if (isNull _missile) exitWith {true}; _cam camSetTarget _missile; _cam camSetRelPos [0,-3,0]; _cam camCommit 0; }; sleep 0.4; _cam cameraEffect ["Terminate", "Back"]; camDestroy _cam; }; }];
  23. im making a zone capture mission and need a way to respawn the player once hes KIA. this mission is so long that dying is unavoidable for most. could anyone help? here the mission http://steamcommunity.com/sharedfiles/filedetails/?id=281793943
  24. i have a script here that checks if a player is connected to an object named uav, but instead of checking one; how can i make it check 2 or more object? sort of like [uav, uav1]. i already tried this it didnt work, it said generic error. ((player == UAVControl uav select 0) && (isplayer _x) && (uav in thisList))} count allUnits > 0";};};
×