OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Dash5 on 14 Jul 2007, 00:19:20
-
I've looked at the usage of these waypoints in the BIKI, but I cannot get desirable results when I attempt to implement them in my missions.
The group seems to wander far and wide with complete disregard for the guard trigger. :confused: Is this a bug?
-
The Guard waypoint is not so much "guard this spot" as-- stand guard for now, if the enemy is spotted head out as a Quick Reaction Force to wherever the trouble is. The waypoints "Hold" and "Sentry" might be more what you are looking for- though Guard is arguably the most powerful and useful of the waypoints for having the AI be smart and reinforce areas you are attacking...
-
So AI only move to the trigger when enemy units are encountered? Is there any way to restrict the range that guard groups wander?
-
Let's say you have a patrol with that's route of waypoints ends in GUARD. They will go to the GUARD waypoint and sit there until an enemy is spotted by either the patrol or one of their comrades, even kilometers away. Then they will rush to wherever the fight is. So they don't move to the trigger when there's any action going on, they actually will probably move anyway. I think this is within only a few kilometers. I don't know how to restrict their range, maybe someone else on the forums knows?
-
I don't know of a way to restrict how far they travel within the existing waypoint system. However, you can try using a script to keep their movement in check. The following example code assumes that the Guard waypoint is the first (and only) waypoint.
_pos = getWPPos [group1,1]
#Loop
~2
; Exit the script if all units in group1 are dead.
? {alive _x} count (units group1) < 1 : exit
; If the leader is farther than 1000 meters from the waypoint, order the group to move to the waypoint.
? (leader group1) distance _pos > 1000 : (units group1) doMove _pos
goto "Loop"
Of course, you can change the 1000 meters to whatever distance suits your needs. I chose to get the distance of the leader from the waypoint's position since I assume that the rest of the squad won't be too far away, since it's an AI squad. I also have it dynamically get the leader of group1 each time just in case the leader dies; that way, the new leader's position will be used instead of the previous dead one's.
-
anoder interestin ting is da createGuardedPoint (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#createGuardedPoint) command... i dint try it but if ny1 does ill b hapy 2 hear how AI handles it
LCD OUT
-
As far as I remember, the guarded by-trigger is the place where the guarding unit will go when nothing is happening. If they (or any unit on their side) detects an enemy, they will move towards that position (if it is within a few kilometers distance). If the enemy disappears or is killed, they will relax and head for the nearest guarded by-trigger (if one is present). Correct me if I'm wrong, please.
-
As I understand it, it seems to be the opposite, nominesine. That is, AI patrol around the "Guard" WP until enemy is encountered, at which point they move to the trigger and defend.
-
hey Dash5,
A great way to test the GUARD waypoint is this, and its actually fun== create a motorized squad and make you the player one of the grunts. Set a guard waypoint only for the squad and then create a firefight between some BLUFOR and OPFOR infantry a few hundred meters away. watch how your orders change and what happens...
-
Thanks for the advice, Lee! That really cleared up a lot of misconceptions I had about the nature of guard waypoints.
-
THobson told me to try that and now i'm passing it on :) Glad it worked! Look forward to the mission you are creating!
-
Read this dusty old thread (http://www.ofpec.com/forum/index.php?topic=883.0) for the wisdom of waypoint master Chris Death.