Jump to content
Sign in to follow this  
Monkeyshots

Restricting enemy AI movement on "Hold" waypoint

Recommended Posts

Hi,

I am wondering how I could keep some enemy AI from moving too far when i want them to hold a certain waypoint.

I was setting the waypoints completion radius to 50 but some of the enemy ai team members that this waypoint is assigned to keep moving

alot further out of that zone.

Am I missing something in my setup? Do i need to set the "placement radius" aswell, - or add something else?

Thanks.

Share this post


Link to post
Share on other sites

A completion radius is the area in which the waypoint is triggered. If your completion radius is 50, then your units will hold the moment they step in that 50 meter circle. So they might hold before getting close the where you want them. It's used mostly for when your units may be coming from different directions, Or if you have a vehicle that moves fast. There are many different reasons to use it.

A placement radius is a randomizer. If you select 50 for a placement radius, then your completion of the waypoint will be somewhere within that radius. It's used when you don't want an exact location. It's really good for patrols. That way you don't know exactly where they will stop.

Your waypoint orders will help you more. If you have "openfire, engage at will" that means they will move around killing where they see enemies. They stay close but will wander more. "Openfire" without the engage at will, will keep them in formation better. "hold fire" might help. They still shoot if an enemy detects them. But they usually stay close.

Make sure they are not set to "safe" behavior. They walk around and don't follow orders too well. "Aware" is a good setting.

You can try other things too. You can trigger them so that when they get where you want, you can "disableAI move". That will turn off their moving but not their firing. You can then trigger them to "enableAI move" when you want. like enemies entering an area etc..

Share this post


Link to post
Share on other sites

You may also want to try http://community.bistudio.com/wiki/enableAttack Write : this enableAttack false in the team leader init box to prevent the leader from ordering his guys to engage you. Or try : {_x allowFleeing (random 0.4)} foreach units group TL in the on act box of your waypoint (TL being the name you must have called the team leader). That will prevent your opponents to flee too soon (this allowFleeing 0 wont let them flee at all).

I also suggest you change the behaviour of the guys once they have detected an ennemy presence : {_x setBehaviour "COMBAT"} foreach units group TL in the on act box of a "blufor detected by opfor" trigger.

Edited by Igitur

Share this post


Link to post
Share on other sites

I have another question relating to this:

Is it possible to tell the squad from which direction to expect the enemy? It's rather annoying that the squad forms a line and lays down looking at completely wrong direction.

Share this post


Link to post
Share on other sites
I have another question relating to this:

Is it possible to tell the squad from which direction to expect the enemy? It's rather annoying that the squad forms a line and lays down looking at completely wrong direction.

You can try : {_x doWatch (getPos H1)} foreach units group this ; in the init box of your leader. H1 for hostile 1's name, which can be a unit, a group, a target, a position, an object, a marker, etc..

Share this post


Link to post
Share on other sites
You can try : {_x doWatch (getPos H1)} foreach units group this ; in the init box of your leader. H1 for hostile 1's name, which can be a unit, a group, a target, a position, an object, a marker, etc..

Doesn't work the way I would want it to work. They do watch the direction, but when the squad gets to the hold/guard/whatever waypoint, they shuffle their formation around and it effectively turns into a column when looking at them from the direction of the enemy.

Share this post


Link to post
Share on other sites
when the squad gets to the hold/guard/whatever waypoint, they shuffle their formation around and it effectively turns into a column when looking at them from the direction of the enemy.

Their behaviour must have been turned to "SAFE" or "CARELESS" for some reason. Check the waypoint parameters (behaviour -must be set to sth other than safe or careless, formation -a "COLUMN" or "COMPACT COLUMN" formation form indeed as a queue) or the triggers involved if you have some.

Share this post


Link to post
Share on other sites

you could of course just use disableAI "Anim"

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  

×