Tyl3r99 41 Posted March 8, 2015 basically im not an experienced mission maker with all the scripts etc but i know the basics and stuff so im happy... i mostly play LAN with my brother etc.. anyway i want to create a mission where me and my brother are on the run after we have crash landed. how would i get the enemy to hunt me and my brother down while we are on the move? for example the AI would always travel to a ROUGH estimated location near us obviously not on our exact position etc.. any help or tips would be appreciated!! Share this post Link to post Share on other sites
demonized 20 Posted March 8, 2015 make your hunting squads in the editor, place this in init of each hunter squad: _null = this spawn { Hunt_players_fnc = { _player = ""; { if (isPlayer _x AND alive _x) then {_player = _x}; } foreach (playableUnits + switchAbleUnits); _wp = _this addWaypoint [getPos _player, (50 + (floor(random 200)))]; _wp setWaypointStatements ["true", "_null = (group this) spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp setWaypointSpeed "FULL"; }; _null = (group _this) spawn Hunt_players_fnc; }; code creates a SAD wp in a random position 250 - 50m around one of the players, they will go search and destroy and when completed create again same way. 2 Share this post Link to post Share on other sites
Tyl3r99 41 Posted March 8, 2015 make your hunting squads in the editor, place this in init of each hunter squad: _null = this spawn { Hunt_players_fnc = { _player = ""; { if (isPlayer _x AND alive _x) then {_player = _x}; } foreach (playableUnits + switchAbleUnits); _wp = _this addWaypoint [getPos _player, (50 + (floor(random 200)))]; _wp setWaypointStatements ["true", "_null = (group this) spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp setWaypointSpeed "FULL"; }; _null = (group _this) spawn Hunt_players_fnc; }; code creates a SAD wp in a random position 250 - 50m around one of the players, they will go search and destroy and when completed create again same way. this is why i have a lot of respect for the arma community.... which values can i change to widen or closen the radius of waypoint? and can i change the combat mode? i.e. normal, danger etc... im guessing combat mode red is danger? also when you say each squad do you mean just the leader yeah? thanks again mate just going to try this out now!! Share this post Link to post Share on other sites
jshock 513 Posted March 8, 2015 In the add waypoint line you see: 50 + (floor random (200)) 50 is your guarnteed radius, and it will be added with a value between 0-199, so change those around as you would like. For comabt mode: https://community.bistudio.com/wiki/setWaypointCombatMode And yea, it should be the group leader I believe. Share this post Link to post Share on other sites
Tyl3r99 41 Posted March 8, 2015 works like a charm... thanks a lot guys. is there any other neat codes like this one i could have fun with?? Share this post Link to post Share on other sites
jshock 513 Posted March 8, 2015 Well there are almost 9500 threads in this sub-forum, so I would say yes, but if you were to be a bit more specific I may be able to point you in a direction. (Code snippets such as the two in my signature usually have fun, neat things that they do) 1 Share this post Link to post Share on other sites
jandrews 116 Posted March 8, 2015 Try these missions out too. similar to what yours sounds like. http://forums.bistudio.com/showthread.php?165448-CO08-Escape-Chernarus-Ports-for-Altis-and-Stratis Share this post Link to post Share on other sites
Gunter Severloh 4062 Posted March 9, 2015 tyl3r99 in the future for any AI related questions, problems, ideas, please review my Ai list before you post a thread as your question and whatever else may have already been answered. see my list: AI Compilation List of Addons/Mods/Scripts & Misc also in my sig. As for the question you had asked in your OP, there is a section for this specifically with about 8 threads listed there. I will add your thread here to that list when I update the list again only because you have something specific for the AI for when they hunt you. Share this post Link to post Share on other sites
Tyl3r99 41 Posted March 9, 2015 thanks Gunter!! will check these out. Share this post Link to post Share on other sites
chrisbaker1981 25 Posted September 1, 2020 The problem with this is it only sends the AI to my original position and sets a search and destroy waypoint. How do I make the Enemy AI constantly update to my position so they truly follow me? Share this post Link to post Share on other sites
M1ke_SK 230 Posted September 1, 2020 https://community.bistudio.com/wiki/BIS_fnc_stalk Share this post Link to post Share on other sites
chrisbaker1981 25 Posted September 1, 2020 Ok great thanks, gonna mess about with that until i either pull my hair out, give up , or come back to the forums for help.. Share this post Link to post Share on other sites
Joe98 92 Posted September 2, 2020 Place an enemy soldier on the map and name him red1 Now write a command: red1 move getPos player; red1 setCombatMode "RED" The enemy will find you and kill you. This works with enemy soldiers, helicopters tanks and everything else. The problem is that when you move to another location, the enemy will always go to your original location. You need the command to start over and over again. The solution: Place a man on the map in an out of the way place. Place waypoints so he runs through a trigger. Place a cycle waypoint so he turns around and runs through the trigger again. He will now run through the trigger over and over again in a never ending loop. In the Activation field of the trigger type the command: red1 move getPos player; red1 setCombatMode "RED" In the Deactivation field of the trigger type the same command: red1 move getPos player; red1 setCombatMode "RED" When the trigger is activated the command is run. When he runs out of the trigger, the trigger is deactivated, the command is run again. In your testing, you need to find out just where the trigger deactivates. If the trigger does not deactivate, then this will not work. So use the command: hint "trigger ON ON ON" and hint "trigger OFF OFF OFF . Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 7, 2020 Could also try LAMBS Danger Mod. Used a few times and works very well. Easy to use too. https://www.youtube.com/watch?v=WtQgvrXUXGY Steam Workshop https://steamcommunity.com/sharedfiles/filedetails/?id=1858075458 Share this post Link to post Share on other sites
Gunter Severloh 4062 Posted September 7, 2020 Take your pick, theres a large number of threads asking, and talking about how to do it in various ways that are listed on my AI compilation list AI Hunting player/group Create group to chase player by script https://tinyurl.com/y46msusq Init code/script for AI to hunt the nearest player https://tinyurl.com/ybufshl6 Hunters chasing player, problem with vehicles https://tinyurl.com/y3lsmd86 How to make AI QRF/Hunter killer team? https://tinyurl.com/y33bdg9e Make enemy know where player is http://tinyurl.com/y24hs8nv Script enemy chases player https://tinyurl.com/y8j6p9go How to make AI Hunt a player while he's on the move?http://tinyurl.com/lp9h88u How to make AI KNOW where player is?http://tinyurl.com/mhej5mj AI to stalk player grouphttp://tinyurl.com/ojevr9a Sneaky Hunter AIhttp://tinyurl.com/k7mfpr2 Group chasing/hunting the playerhttp://tinyurl.com/oh8f74r Enemies follow players?http://tinyurl.com/nd3hmea Make enemy hunt player scripthttp://tinyurl.com/mubku5g All remaining enemy Chase player/teamhttp://tinyurl.com/lkhn6d2 Making enemy units chase playerhttp://tinyurl.com/lr8ku6m AI hunting playerhttp://tinyurl.com/phm3e5w Share this post Link to post Share on other sites
chrisbaker1981 25 Posted September 7, 2020 I ended up doing this 1) In my players init I wrote "team1 = group this" 2) In OPFOR squadleaders init I wrote "team2 = group this" 3) On a player activated trigger i put on activation "_stalking = [team2,team1] spawn BIS_fnc_stalk;" I have multiple enemy squads dotted around each activated with a different trigger.. This worked perfectly! 2 Share this post Link to post Share on other sites
John Douglas 2 Posted September 23, 2020 Hi chrisbaker1981, Sorry for not getting back to you earlier. This was my hobby horse a year or 2 ago and as a newbie I found the same two things challenged me >> Learning Code & Placing the code << Anyway, I still have all my code and bright ideas, but having had a break and taken on some new projects (Games / Sims) I have become a little rusty. Also my 500gb hard drive is full with Arma2 and now Arma3 downloads, and still behind building that new gaming rig So I was thinking of temporally annexing Arma2, but I haven't. So if you have any further questions post here or contact me directly but it looks like you've solved it ! Share this post Link to post Share on other sites
chrisbaker1981 25 Posted September 23, 2020 2 hours ago, John Douglas said: Hi chrisbaker1981, Sorry for not getting back to you earlier. This was my hobby horse a year or 2 ago and as a newbie I found the same two things challenged me >> Learning Code & Placing the code << Anyway, I still have all my code and bright ideas, but having had a break and taken on some new projects (Games / Sims) I have become a little rusty. Also my 500gb hard drive is full with Arma2 and now Arma3 downloads, and still behind building that new gaming rig So I was thinking of temporally annexing Arma2, but I haven't. So if you have any further questions post here or contact me directly but it looks like you've solved it ! Thanks John yes solved this one.. Every time i make a mission it ends up being more about an obsession with one or two particular issues that i can't solve... Rather than the actual mission itself.. Quite satisfying when it works. I've never done any scripting before so learning a lot here! Share this post Link to post Share on other sites