Jump to content
Sign in to follow this  
dragon zen

How to make AI NOT get into vehicles? And Related Question about Waypoints

Recommended Posts

Hello my friends:

I create a group with several AI soldiers (without player), and their have a vehicle such as UAZ_AGS30. And then I let them move to center of battle ground (500M away) with waypoint type Seek and Destroy.

My question is that why AI leader always order soldiers get in to the vehicle? I don't want the soldiers sit on the seat of vehicle which do not have weapon, and I need them walk.

I wonder this is related to waypoint type (such as combat mode of "Red"/"Yellow", or AI Behavior such as "Combat"/"Stealth"), but I didn't test it very clear. So I hope some body can do me a favor, tell me about how to achieve this. Thanks a lot.:bounce3:

============

BTW, there are two additional questions about WPs.

1) what is different (or relationship) between SetCombatMode and SetWaypointCombatMode? If I set the former first and don't set the latter, will it ensure that they always behavior in what I set (such as SetCombatMode "Red"), no matter how many new waypoints add (without setting SetWaypointCombatMode)?

2) If a new soldier join into a group, is it necessary to set combat mode again?

DragonZen

Share this post


Link to post
Share on other sites

Or you can use "unit allowGetIn false". And before that the "unit orderGetIn false" if they are mounted (or if some of them are). My experience is that it works very well.

Command setCombatMode sets the combat mode immediately. The setWaypointCombatMode command sets the combat mode when the current waypoint becomes active. If you use setWaypointCombatMode on first waypoint it usually don't make difference. However, I have noticed that the combat mode sometimes doesn't kick in in the latter case (probably since the waypoint has already become active after the addWaypoint command).

If a soldier joins the group it gets the group's combat mode.

---------- Post added at 16:50 ---------- Previous post was at 16:44 ----------

So, answer on your extra question 1) is No. If a new waypoint becomes active, and if that waypoint have its own combat mode, the groups combat mode will change. (I haven't run any tests om this, but I feel pretty sure that this is how it works).

Share this post


Link to post
Share on other sites

Thanks for your suggestion friends!! I'll try the code you provide.

What I concerned is whether the leader will order their soldiers again and again even they can't get in the vehicle.

Another thing is that, because I add switch between teams, so sometimes player may join that group, and sometimes maybe I need certain units getin the vehicle. So I hope I can change the group leader, rather than the value of units.

But that's OK, I'll try this code firstly.

Edited by Dragon Zen

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  

×