Yoiink 1 Posted March 18, 2012 Hello good ppl! I am a huge nubb in the arma2 editor, but i would very much appreciate some help or input to understand how the AI "detection rules works", and how AI share information between themselves... For example,when a enemy is detected by a single unit, what can i do to make this unit share its knowlage of enemy possition to other units, all other units or spesific ones. What are the "rules" the AI is using if you will? Does units have to be grouped, in near proximity, or something like this? Damit, i am very poor at describing what i want to understand and i can see that now, sorry about that..... Maybe better if i try an example..... I have a lot of patrols on cycle waypoints, (they are not grouped together) , what i want is; if I am detected by one of the patrols for more than 5 seconds i want them to "call" for backup to some, or all of the other patrols so they will have intell first patrol had. I have been trying to do this with setting up triggers with a detetected in this area all all over the place to make the patrols go there, but its dosent achive same effect and, is verrrryyyyy timeconsumeing . It has to be a better way to do this. AND uinit on a patrol cycle, beeing sent off to a seearch and destroy by a switch trigger, is there a way to get it to resume the old waypoints again when s and d is complete? If anyone get my clumsy formulated questions, or understand what i want to atchive, pls find it in your kind heart to help me out here. How would you set up this simple patrol stuff ? ? ? (in deepth noob friendly pls) In advance thx for anny help :) Share this post Link to post Share on other sites
PELHAM 10 Posted March 18, 2012 (edited) You need to look at the following commands and you will get examples if you search this section for them: knowsAbout nearTargets reveal Also this might help when adjusting skills after spawning a group: _grpbuild1 = [getMarkerPos "marker_house1", EAST, (configFile >> "CfgGroups" >> "EAST" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup; { _x setskill ["aimingAccuracy",0.75]; _x setskill ["spotDistance",0.95]; _x setskill ["spotTime",0.85]; _x setskill ["courage",0.85]; _x setskill ["commanding",0.85]; _x setskill ["aimingShake",0.65]; _x setskill ["aimingSpeed",0.85]; } foreach units _grpbuild1 ; Usefull code from the wiki: if (group knowsAbout vehicle object > 0) then { if ( (alive object) && (canMove object) && (count (magazines object) > 0) ) then { hint "unleash hell!!!"; //or reveal, moveTo, setWPpos etc }; }; Edited March 18, 2012 by PELHAM Share this post Link to post Share on other sites
Yoiink 1 Posted March 19, 2012 Thx for the reply man! Unforunetly the conding stuff is way beyond me :/ Im not Dr. Cooper you know :P So there is no way of doing patrols like this without the scripting and stuff then... Btw, ai seems to reacting to silenced guns from farfar away, almost like a dead ai is saying ; hey man i just died, scramble! Guess i have to give up on the the editor, coding scares the crap out of me. Anyways thx for taking time to answar. Share this post Link to post Share on other sites
PELHAM 10 Posted March 19, 2012 (edited) Well a simple way would be to move a trigger to the patrols leader (you would need a loop to continually check who is the leader and if he is alive). Then if Blufor is present (you) you could setWPpos other patrols waypoints to the 1st patrols position so they all come running. It's not as hard as it sounds: in your init.sqf: while {true} do { if (({alive _x} count units _patrol) == 0) exitWith {deleteVehicle trigger1}; _GrpLeader = leader _patrol; trigger1 setPos getPos _GrpLeader; }; In the trigger onAct: patrolwpindex = currentWaypoint patrolName; patrolwpindex setWPPos getPos nameGrpLeader; Create your patrols like this: Needs functions module on map. waituntil {!isnil "bis_fnc_init"}; _patrol = [getMarkerPos "patrolsp", EAST, ["RU_Soldier_AT", "RUS_Soldier_TL", "MVD_Soldier_GL", "RU_Soldier_MG", "RU_Soldier_AT"]] call BIS_fnc_spawnGroup; _patrolwp1 = _patrol addWaypoint [_position, 0]; _patrolwp1 setWaypointType "MOVE"; _patrolwp1 setWaypointSpeed "FULL"; _patrol setCombatMode "RED"; AI will react to sounds and deaths of their group members, it's part of their standard inteligence. The whole side will share information if you are known about by 1 AI. Edited March 20, 2012 by PELHAM Share this post Link to post Share on other sites