war34d 10 Posted April 24, 2015 Hey Everyone, When ever I'm working on a mission move and cycle way points are always used for the AI to petrol a certain area. The problem is when that area is under attack the AI still petroling their defined path unless they have visual contact, I wanted to ask you guys if there is anyway for AI to break patroling behaviour and switch to Seek and destroy waypoint when a trigger gets activated?! For example, an AI squad is given 4 move and 1 cycle waypoints and they will keep patroling unless they see an enemy. Now i want them to leave petroling and engage enimies when area is underattack. Share this post Link to post Share on other sites
das attorney 858 Posted April 24, 2015 Try UPS, upsmon or dac (threads are in this forum for UPS and upsmon - DAC is here http://www.armaholic.com/page.php?id=25550. They all do what you are asking and more. Share this post Link to post Share on other sites
war34d 10 Posted April 24, 2015 Try UPS, upsmon or dac (threads are in this forum for UPS and upsmon - DAC is here http://www.armaholic.com/page.php?id=25550. They all do what you are asking and more. Thanks for the reply, I don't think these scripts are the answer to my question. The reason i prefer to create mission old fashion way is because you know exactly which area AI should be gaurding and when they should attack. I also find that some of these scrips can drop frames significantly. For some people UPS and DAC can be really useful but i prefer to do everything myself. Share this post Link to post Share on other sites
jshock 512 Posted April 24, 2015 You could probably do a FiredNear EH on all your groups, from that broadcast a variable, basically simulating a radio call for help, then send "x" number of groups as reinforcements to the area of the broadcasting group. I would recommend setting another variable saying which groups are already being used as support (so you don't have another group broadcast, therefore possibly pulling a support group in two directions). Share this post Link to post Share on other sites
war34d 10 Posted April 24, 2015 You could probably do a FiredNear EH on all your groups, from that broadcast a variable, basically simulating a radio call for help, then send "x" number of groups as reinforcements to the area of the broadcasting group. I would recommend setting another variable saying which groups are already being used as support (so you don't have another group broadcast, therefore possibly pulling a support group in two directions). Thanks Jshock for the reply, What you are suggesting might work but it's a bit complicated. Thanks to @FeuerEXcz found a better and simple way, it's funny that we didn't think of that. If you just select the cycle waypoint and add another seek and destroy waypoint, than sync the cycle waypoint to a switch trigger. The only drawback with this method is that the group has to get to the cycle waypoint before leave petroling and engage enemy but i think i can live with that :) Share this post Link to post Share on other sites
katipo66 94 Posted April 24, 2015 (edited) I use the guard waypoint synced to trigger with switch.., It worked in Arma2 but should work in 3, I forget the sequence but essentially I had it so a group would continuously patrol until knows about enemy, they would go to investigate and then return to their patrol waypoints, from memory there were 2 cycle waypoints, the first cycle would connect to the very first waypoint creating the loop, the cycle wp is synced to a trigger with switch, then add a guard waypoint to the synced cycle waypoint and then another cycle wp connecting to the first wp again. I used the guard wp because it was sort off a dynamic setup so needed them to be able to go anywhere required. Edit: seems to still work, heres a sample mission you maybe want to get a better condition than "Not Present" for the trigger synced to the guard WP Edited April 24, 2015 by Katipo66 Sample mission Share this post Link to post Share on other sites
Larrow 2812 Posted April 24, 2015 (edited) Heres a little example.. h = [] spawn { //Create a BLUFOR Fireteam @ patrolSpawn marker _newGrp = [ getMarkerPos "patrolSpawn", west, configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfTeam" ] call BIS_fnc_spawnGroup; //Add waypoints to group of markers wp1 wp2 and wp3 { _wp = _newGrp addWaypoint [ getMarkerPos _x, 0]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "LIMITED"; _wp setWaypointBehaviour "SAFE"; }forEach [ "wp1", "wp2", "wp3" ]; //Add a CYCLE waypoint at marker patrolSpawn _wp = _newGrp addWaypoint [ getMarkerPos "patrolSpawn", 0]; _wp setWaypointType "CYCLE"; _wp setWaypointSpeed "LIMITED"; _wp setWaypointBehaviour "SAFE"; //Add a SAD waypoint at myTrig's position _sad = _newGrp addWaypoint [ getPosATL myTrig, 0]; _sad setWaypointType "SAD"; _sad setWaypointSpeed "FULL"; _sad setWaypointBehaviour "AWARE"; while { true } do { //Wait for the trigger to become active waitUntil { triggerActivated myTrig }; //Store current patrol waypoint _lastPatrolPoint = currentWaypoint _newGrp; //Set groups current waypoint to the SAD _newGrp setCurrentWaypoint _sad; //Wait until SAD has finished waitUntil { currentWaypoint _newGrp isEqualTo ( count waypoints _newGrp ) }; //Send group back to their patrol ( where they left off ) _newGrp setCurrentWaypoint [ _newGrp, _lastPatrolPoint ]; }; }; Group will cycle markers "patrolSpawn", "wp1", "wp2", "wp3" When trigger myTrig becomes active they will move to the trigger position and perform a SAD (Search and Destroy) They will keep doing SAD until trigger becomes deactivated They will then return to their original cycle patrol Edited April 24, 2015 by Larrow Share this post Link to post Share on other sites