Jump to content
Sign in to follow this  
pexmo

"Embark If" How to use multiple waypoint routes?

Recommended Posts

Hi. 
I have recently been trying to get a system of multiple waypoint routes to work in arma, similar to the system used in the armored warfare simulator Steel Beasts pro PE. 

I have attached a image here to further explain what I am trying to do: 

 

BhjDQjx.png

 

So here is what I would like to achieve: 

 

The red AI group has the default route set first (Marked with red outline). The AI group is to follow this route if no triggers are set. 

A and B are decision points. Take A as an example: 

 

  • If when reaching A (first waypoint in the default route chain) BlueFor is detected in trigger 1 - Change from default route to Route A1
  • If when reaching A BlueFoe is detected in trigger 2 - Change from default route to Route A2.

 

When the unit has made a choise at a decision point all other options are null, only decision points along the new route will be used. 

Any tips on how to do this? Also, Any tips on adding a trigger that checks at a decision point if the AI group is under fire? 

 

Thanks.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Try adding waypoints when trigger condition is met. These could be added when the trigger detects any forces within the area triggers. After they are done the units should proceed from Route A1/A2 End to waypoint B (where another "choice" is made). Set triggertype to "skip" waypoint and put something like this in it's "on activation" field with the condition being opfor present.

wp1= <groupname> addWaypoint [position thisTrigger, 1];[<groupname>, 1] setWaypointType "Move"; 
[<groupname>, 1] setWaypointSpeed "Full";
[<groupname>, 1] setWaypointCombatMode "RED";
wp2= <groupname> addWaypoint [getMarkerPos "mrk_B", 2];[<groupname>, 2] setWaypointType "Move";

 

Share this post


Link to post
Share on other sites

Thank you. I will try this out. 
Related question? How can I set a trigger to  "when the AI unit is under fire"?

 

Also.... maybe should make a separate question about this but I ask here as well... is there any way to set a invisible target or something, and tell a ai unit to move from its current position straight towards this target UNTIL it can see it? 
If this could be used on gunners in vehicles a basic quite dangerous tank "ai" could be done - This plus carefully placed wp chains on a always careless driver. 

Share this post


Link to post
Share on other sites

For the dynamic waypoints you could simplify it a lot if the red group doesn't have to follow an exact route and make them move straight towards the respective triggers.

In the triggers onAct put:

RedGroup lockWP true;
RedGroup move getPosATL thisTrigger;
systemchat "Moving to trigger1";

 

For the tank hunting a unit:


GOM_fnc_Hunt = {
params ["_tank","_target"];

	while {alive _tank AND alive _target} do {

		_pos = getPosATL _target;
		_tank domove _pos;
		systemchat "Moving in";

		if (behaviour effectiveCommander _tank isEqualTo "COMBAT") exitWith {systemChat "Engaging!"};

		sleep 3;

	};

};
_hunt = [TankName,TargetName] spawn GOM_fnc_Hunt;

Cheers

  • Like 2

Share this post


Link to post
Share on other sites

Thanks grumpy. 
That is a good hunting script. But to specify about the tank thing: 

 

Is there a way to use objects, or invisible targets to do the following: 

 

I set a waypoint to a tank. It has a careless driver and a gunner separate groups.

I place a invisible target or an object in a valley

The waypoint takes the tank, by waypoint that the driver has to a hill next to the valley.

Now, I want the tank to move straight towards the objective/invis target until the gunner has line of sight to it.... then stop in place. 

Maybe this is far beyond what can be done  here but it would create a somewhat solution for AI armored vehicles to move and then take up hull down positions towards an area.

 

If this cant be done, how to do I move a tank to a EXACT position?  

Share this post


Link to post
Share on other sites

Iukios advice worked great. Just have to make sure that I delete the none slected options "triggers" when I have something chosen. Else they might head back and forth like crazy 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×