-
Content Count
464 -
Joined
-
Last visited
-
Medals
Everything posted by ArmaMan360
-
Truck with Enemy should stop and unload, enemy attack players
ArmaMan360 replied to Purzel's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Before you spawn the group of enemies, mention the following _alpha creategroup west/east // (whatever side is the enemy) ////<<<< group spawn line here & mention _alpha as the group name ....... ...... ...... et1 doMove getPos _alpha; Try this. I am a noob myself but learning my way up :) -
Execute multiple commands at Ai respawn?
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow Larrow, thank you such a detailed explanation. But sadly it is not working. Still a "new" soldier is spawned. :( AIRespawnInit.sqf //AIrespawnInit 1.0 by SPUn if(!isServer)exitWith{}; private["_defaultCleanUp","_diag"]; AIRS_respawn_init = { //Add from here <<<<<<<< private[ "_loadoutScript", "_unit", "_nul" ]; params[ "_group" ]; _loadoutScript = _group getVariable [ "loadoutScript", [] ]; { _unit = _x; { switch ( typeName _x ) do { case ( typeName "" ) : { _nul = _unit execVM _x; }; case ( typeName {} ) : { _nul = _unit spawn _x; }; }; }forEach _loadoutScript; }forEach units _group; }; //To here <<<<<<<<< AIRS_respawn_delay = 25; //AI respawn delay (if not defined in squad leaders init) _defaultCleanUp = true; //cleanUp script [WIP] (removes corpses & wrecks > 300m of player(s) every 60 secs) _diag = false; //if true, script hints live unit amount statistics during editor testing, helps you to adjust group amounts & sizes better) //You can set respawning off side related by changing these variables from your mission: AIRS_respawn_WEST = true; //respawn WEST groups AIRS_respawn_EAST = true; //respawn EAST groups AIRS_respawn_INDE = true; //respawn INDEPENDENT groups //Just to make sure it's safe to spawn units WESTcenter = createCenter west; EASTcenter = createCenter east; INDEcenter = createCenter resistance; //Prepare some AIRS functions AIRS_SpawnGroup = compile preprocessFile "AIRS\spawnGroup.sqf"; AIRS_StartTask = compile preprocessFile "AIRS\startAItask.sqf"; AIRS_buildingPatrol = compile preprocessFile "AIRS\buildingPatrol.sqf"; AIRS_taskPatrol = compile preprocessFile "AIRS\BIS_fnc_taskpatrol2.sqf"; AIRS_taskDefend = compile preprocessFile "AIRS\BIS_fnc_taskdefend2.sqf"; AIRS_fnc_spawnVehicle = compile preprocessFile "AIRS\BIS_fnc_spawnVehicle2.sqf"; AIRS_fnc_spawnGroup = compile preprocessFile "AIRS\BIS_fnc_spawnGroup2.sqf"; AIRS_DestroyEmptyVehicle = compile preprocessFile "AIRS\destroyEmptyVehicle.sqf"; //Start monitoring AI groups execVM "AIRS\monitorAIgroups.sqf"; //Prepare some LV functions LV_GetPlayers = compile preprocessFile "LV\LV_functions\LV_fnc_getPlayers.sqf"; LV_NearestBuilding = compile preprocessFile "LV\LV_functions\LV_fnc_nearestBuilding.sqf"; LV_RemoveDead = compile preprocessFile "LV\LV_functions\LV_fnc_removeDead.sqf"; LV_VehicleInit = compile preprocessFile "LV\LV_functions\LV_fnc_vehicleInit.sqf"; LV_Follow = compile preprocessFile "LV\LV_functions\LV_fnc_follow.sqf"; LV_InMarker = compile preprocessFile "LV\LV_functions\LV_fnc_isInMarker.sqf"; //Cleanup: if(_defaultCleanUp)then{execVM "AIRS\cleanUp.sqf"}; if(_diag)then{execVM "AIRS\diag.sqf"}; AIRS_Initialized = true; addAIgroupToPool.sqf if(!isServer)exitWith{}; waitUntil{!isNil("AIRS_Initialized")}; private["_grp","_classnames","_lifes","_task","_base","_delay","_vehicles","_air","_azi"]; _grp = group (_this select 0); _task = if(count _this > 1)then{_this select 1}else{nil}; _lifes = if(count _this > 2)then{_this select 2}else{0}; _base = if(count _this > 3)then{_this select 3}else{nil}; _delay = if(count _this > 4)then{_this select 4}else{AIRS_respawn_delay}; _air = if(count _this > 5)then{_this select 5}else{false}; _loadoutScript = param[ 6, [], [ [] ] ]; //Add this <<<<<< _classnames = []; _vehicles = []; { if(vehicle _x != _x)then{ if(_x == (driver (vehicle _x)))then{ _classnames set[(count _classnames),(typeOf (vehicle _x))]; }; if(!((vehicle _x) in _vehicles))then{_vehicles set[(count _vehicles),(vehicle _x)]}; _azi = direction (vehicle _x); }else{ _classnames set[(count _classnames),(typeOf _x)]; }; }forEach units _grp; _grp setVariable ["classnames", _classnames]; _grp setVariable ["lifes", _lifes]; _grp setVariable ["state", "alive"]; _grp setVariable ["delay", _delay]; _grp setVariable ["air", _air]; _grp setVariable [ "loadoutScript", _loadoutScript ]; //Add this <<<<< _grp call AIRS_respawn_init; //Add this <<<<<< if(isNil("_azi"))then{_azi = (random 360)}; _grp setVariable ["azi", _azi]; if(!isNil("_base"))then{ if(_base == "original")then{ _grp setVariable ["base", (getPos (leader _grp))]; }else{ _grp setVariable ["base", _base]; }; }; if(!isNil("_task"))then{_grp setVariable ["task", _task]; [_grp] call AIRS_StartTask;}; { [_x] spawn AIRS_DestroyEmptyVehicle }forEach _vehicles; spawnGroup.sqf //spawnGroup 1.0 by SPUn if(!isServer)exitWith{}; private ["_array","_faction","_group","_side","_base","_grp","_tempGrp","_lifes","_setBase","_task","_delay","_air","_azi","_basePos"]; _array = _this select 0; _faction = _this select 1; _group = _this select 2; _group setVariable ["state", "spawning"]; _delay = _group getVariable "delay"; sleep _delay; switch(_faction)do{ case "BLU_F":{ _side = west; }; case "BLU_G_F":{ _side = west; }; case "OPF_F":{ _side = east; }; default { _side = resistance; }; }; if((_side == west)&&(!AIRS_respawn_WEST))exitWith{}; if((_side == east)&&(!AIRS_respawn_EAST))exitWith{}; if((_side == resistance)&&(!AIRS_respawn_INDE))exitWith{}; _setBase = _group getVariable "base"; if(isNil("_setBase"))then{ if(_side == resistance)then{ _base = "respawn_guerrila"; }else{ _base = "respawn_" + (str _side); }; _basePos = getMarkerPos _base; }else{ if((typeName _setBase) == "ARRAY")then{ if((_setBase select 0) in allMapMarkers)then{ _base = _setBase call BIS_fnc_selectRandom; _basePos = getMarkerPos _base; }else{ _basePos = _setBase; }; }else{ _basePos = getMarkerPos _setBase; }; }; _air = _group getVariable "air"; _azi = _group getVariable "azi"; _grp = [_basePos, _side, _array,nil,nil,nil,nil,nil,_azi,_air] call AIRS_fnc_spawnGroup; _tempGrp = []; { _tempGrp set[(count _tempGrp),_x] }forEach units _grp; _tempGrp joinSilent _group; deleteGroup _grp; _group call AIRS_respawn_init; //Add this <<<<< _lifes = _group getVariable "lifes"; if(_lifes > 0)then{ if(_lifes > 1)then{ _lifes = _lifes - 1; _group setVariable ["lifes", _lifes]; }else{ _group setVariable ["classnames", nil]; _group setVariable ["lifes", nil]; _group setVariable ["task", nil]; _group setVariable ["base", nil]; _group setVariable ["state", nil]; _group setVariable ["delay", nil]; _group setVariable ["air", nil]; _group setVariable ["azi", nil]; }; }; _group setVariable ["state", "alive"]; _task = _group getVariable "task"; if(!isNil("_task"))then{ [_group] call AIRS_StartTask; }; unit init line null = [this] execVM "loadout.sqf"; nul = [this,["east","DEFEND"],0,"original",5,[ "loadout.sqf", { _this addeventhandler ["Fired",{if (_this select 1=="Strela") then {_this select 0 addMagazine (_this select 5)}}]; } ]] execVM "AIRS\addAIgroupToPool.sqf"; :( -
Execute multiple commands at Ai respawn?
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No man. I am still to try it. I just made the script up by combining these snippets through various forums. If you feel its ok R3vo i'll try it tonight :) EDIT: Ok so its not working. He spawns with the custom loadout, but he respawns with the defaultkit. Here is the new init: null = [this] execVM "loadout.sqf"; this addeventhandler ["Fired",{if (_this select 1=="Strela") then {_this select 0 addMagazine (_this select 5)}}]; nul = [this,["east","DEFEND"],0,"original",5] execVM "AIRS\addAIgroupToPool.sqf"; << respawn script this addeventhandler ["respawn","this execVM 'loadout.sqf'"]; -
Execute multiple commands at Ai respawn?
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Through a fantastic script called AI Respawn System a.k.a. AIRS... as I only play SP.Please suggest any better way to execute all these things together.. :) -
Bon's Infantry Recruitment Redux
ArmaMan360 replied to aviatormoser's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I am a huge fan of this script and it works flawlessly. However, I do have a question. I want the recruit list to be inclusive of just 5-6 unique soldiers whom I gear up with virtual arsenal loadouts. Lets say I got 3 normal riflemen put down in the editor, I put 3 different virtual arsenal loadouts in their "init" respectively and I name them p1, p2, p3. How can I hide them from mission start and only make them recruitable "n" amount of times? Thank you. -
Group Manager, Loadout and Paper Doll addon
ArmaMan360 replied to subliminalss's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Annoyed. Keeps showing a blak screen with a message that unit is unconscious press escape select other playable unit. Whats the deal? -
Multiple waituntils for task completion screwed up
ArmaMan360 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok this is not working: .. _convoy = [_vehicle2, _vehicle3]; { script_handler = [] spawn waitUntil {sleep 0.5; ((_mkrpos distance _x) < 70);} foreach _convoy; waitUntil {!alive _vehicle2 && !alive _vehicle3 || scriptDone script_handler}; if (!alive _vehicle2 && !alive _vehicle3) then { ["Task3", "FAILED", true] call BIS_fnc_taskSetState; } else { ["Task3", "SUCCEEDED", true] call BIS_fnc_taskSetState; }; }; I want that if the convoy reaches a distance less than 70 metres of _mkrpos, I fail the task., But I am able to take our veh 2 and veh 3, then I win. Will if statement be better for such multiple instances? I am getting errors now. Thank you. -
Multiple waituntils for task completion screwed up
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Works great thank youuuu... I just had the replace the words "succeeded" with "failed" and vice versa.. Ok when the convoy moves and if I start shooting them, it will change its course. If I go to rearm from base in case I run out of ammo, will the convoy still try to find a way to the obj or totally let go of the objective and keep wandering around the map? -
Multiple waituntils for task completion screwed up
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_convoy = [_vehicle2, _Vehicle3]; waitUntil {sleep 0.5; { _x distance _mkrpos < 70 } count _convoy >= {alive _x} count _convoy }; ["Task3", "FAILED"] call BIS_fnc_taskSetState; waitUntil {sleep 3; !(canMove _vehicle2) && !(canMove _vehicle3)}; ["Task3", "Succeeded"] call BIS_fnc_taskSetState; The first waituntil fires corectly when convoy reaches within 70 mtrs. of objective. But the second waituntil has 2 issues: 1. It doesnt fire when both the vehicles cannot move but rather need to be exploded 2. Even if it does fire, it still fails the task. Maybe the alive check in the first waituntil is responsible? -
Multiple waituntils for task completion screwed up
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
and this is throwing the error that Type object expected bool: waitUntil {sleep 3; ((_vehicle2 && _vehicle3 distance _mkrpos) < 70);}; ["Task3", "FAILED"] call BIS_fnc_taskSetState; -
Multiple waituntils for task completion screwed up
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
OK what changes are needed in this? waitUntil {sleep 3; (((_vehicle2 && _vehicle3) distance _mkrpos) < 70);}; ["Task3", "FAILED"] call BIS_fnc_taskSetState; waitUntil {sleep 3; (alive _vehicle2) && !(alive _vehicle3)}; ["Task3", "Succeeded"] call BIS_fnc_taskSetState; Right now i am getting the error that "Missing ; " after "...<70#).. As far as i know ";" isnt needed after the distance check. -
Spawning other units as "Playable" and then clicking the key set for "team switch" from the controls maybe? That way they will remain AI until you or any other player unit gets control over 'em.
-
Ok. I will be waiting for Jezuro to help me here then :)
-
Unable to make heli follow land leader wp
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In a way it is but it is satisfying :D -
Unable to make heli follow land leader wp
ArmaMan360 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
... _convoy = [_vehicle1,_vehicle2,_vehicle3,_vehicle4]; { createVehicleCrew _x; _x setskill 0.7; _grp = group _x; _x = _grp addWaypoint [_mkrpos, 0]; _x setWaypointType "MOVE"; _x setWaypointSpeed "LIMITED"; _x setWaypointBehaviour "SAFE"; _x setWaypointFormation "COLUMN";//"STAG COLUMN" } foreach _convoy; sleep 1.5; _array = _convoy; { waituntil {sleep 0.5; ((_mkrpos distance _x) < 40);}; } foreach _array; hint "obj failed"; So _vehicle1 and _Vehicle 4 are assigned as guard units, and _Vehicle2 and _Vehicle3 are trucks which need to be protected. _Vehicle4 on the otherhand can be a heli or an MRAP as my array has both and put on selectrandom. I am able to spawn everyone and if they are all land vehicles they start moving as planed, i.e. in a column formation. But if _vehicle4 returns a heli, it makes its own wp to the destination and moves toward it as a single unit, away from the group. The land units obey me very well. So I want to make _vehicle1 as the leader of this group, and a way for the _vehicle2, _vehicle3, and _vehicle4 to follow the leader strictly in column formation. Thank you. :) -
Unable to make heli follow land leader wp
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ohhhhh yeahhh thanks... hate these small mistakes... :P -
Unable to make heli follow land leader wp
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Finallyyy... Here if someone needs it :D call compile preprocessfile "SHK_pos\shk_pos_init.sqf"; _sidepos = getMarkerPos "m1"; // Spawn enemy convoy _grp = createGroup west; _vehlist = ["B_MRAP_01_hmg_F", "B_MRAP_01_gmg_F", "B_APC_Wheeled_01_cannon_F"]; _trklist = ["afr_kamaz_covered", "B_Truck_01_covered_F", "B_Truck_01_box_F"]; _mkrpos = [_sidepos, [4000,5500], [120,180], 0, [2,5000]] call SHK_pos; _mkr = createmarker ["here", _mkrpos]; _mkr setMarkerShape "Icon"; _mkr setMarkerType "hd_destroy"; _mkr setMarkerColor "ColorBlufor"; _mkr setMarkerText "Stop the convoy from reaching here"; sleep 0.5; _newPos = [_sidepos, 0, 25, 1, 0, 200, 0, []] call BIS_fnc_findSafePos; _vehtype = (count _vehlist )-1; _type = _vehlist select (round random _vehtype); _vehicle1 = createVehicle [_type, _newpos, [], 0, "FORMATION"]; createVehicleCrew _vehicle1; _vehicle1 setskill 0.7; _vehicle1 setRank "COLONEL"; _grp = group _vehicle1; _ldr = _vehicle1; _wp1 = _grp addWaypoint [_mkrpos, 0]; _vehicle1 setWaypointType "MOVE"; _vehicle1 setWaypointSpeed "LIMITED"; _vehicle1 setWaypointBehaviour "SAFE"; _vehicle1 setWaypointFormation "COLUMN"; sleep 1; _newPos = [_sidepos, 0, 25, 1, 0, 200, 0, []] call BIS_fnc_findSafePos; _vehtype = (count _trklist )-1; _type = _trklist select (round random _vehtype); _vehicle2 = createVehicle [_type, _newpos, [], 0, "FORMATION"]; createVehicleCrew _vehicle2; _vehicle2 setskill 0.7; _vehicle2 setRank "LIEUTENANT"; sleep 1; _newPos = [_sidepos, 0, 25, 1, 0, 200, 0, []] call BIS_fnc_findSafePos; _vehtype = (count _trklist )-1; _type = _trklist select (round random _vehtype); _vehicle3 = createVehicle [_type, _newpos, [], 0, "FORMATION"]; createVehicleCrew _vehicle3; _vehicle3 setskill 0.7; _vehicle3 setRank "LIEUTENANT"; sleep 1; _newPos = [_sidepos, 0, 25, 1, 0, 200, 0, []] call BIS_fnc_findSafePos; _backend = ["B_Heli_Light_01_armed_F", "B_Heli_Transport_01_F"]; _type4 = _backend call BIS_fnc_selectRandom; _vehicle4 = createVehicle [_type4, _newpos, [], 0, "NONE"]; createVehicleCrew _vehicle4; _vehicle4 setskill 0.7; _vehicle4 setRank "CAPTAIN"; [_vehicle2, _Vehicle3, _vehicle4] join _ldr; sleep 1.5; _convoy = [_vehicle2, _vehicle3]; { waituntil {sleep 0.5; ((_mkrpos distance _x) < 50);}; } foreach _convoy; hint "obj failed"; -
You mean, start a LAN game and then take it ahead? As the first post says you can solo with AI.
-
Unable to make heli follow land leader wp
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea i was thinking something like "dofollow". Thank you for the hint man. You are always with the right advice. I will get back with results. :) -
Its a fiiiine mod. But I do see that while playing SP, my side mates teleport to the zone area but stay outside the actual base defences. 1-2 AIs do act as intruders to the core zone area and indulge in firefights, but rest stand outside as if this enablesimulation false. lol But a great mod none the less :D
-
DAC V3.1 (Dynamic-AI-Creator) released
ArmaMan360 replied to silola's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Yeah man. I think I have found a work around. What I did was inside the waypoints config file, I saw the arrays in case 1 were very different from case 0, hence I copied all the case 1's entries for "heli". lol It doesnt throw any error now. But one in 10 times it does throw an error, but for armoured units. thats manageable and yes I use the 3.1b. :) Thank you anyway :) -
Reveal all enemy units for x seconds?
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks :) Im sure this will help a lot of others.. :D -
DAC V3.1 (Dynamic-AI-Creator) released
ArmaMan360 replied to silola's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Thank you. I too adjusted its waypoint config and now it doesnt throw any errors except for armour units sometimes. But thats bearable. :) i can always restart the mission. Btw Savage, tell me about it plzzz: "You might be able to adjust this so they start flying with engines on via script and DAC_Config_Events." -
Using Unit Option when using CREATEVEHICLE
ArmaMan360 replied to armakwalski's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
*thumbs up* -
Reveal all enemy units for x seconds?
ArmaMan360 replied to ArmaMan360's topic in ARMA 3 - MISSION EDITING & SCRIPTING
By the way, R3vo that reveal enemy script you showed is finding wrong entities. And I am next to those spots but no enemies. Is it because the if (side _unit != playerSide) then ... searches for everything apart from playerside? Animals? Can I safely change this line to if (side _unit = WEST) then ... so that it only reveals units on west side? Thank you.