Jump to content
Sign in to follow this  
anfo

Prevent AI from moving

Recommended Posts

Hello all

 

I have struggled with this problem for a little while so I was hoping to see how other editors manage to overcome it.

 

Take an opfor enemy squad, who you only want to advance from their placed position once blufor initiate a trigger. So my process which I presume matches most, is to create a move waypoint which is syncronised with a blufor activated trigger. No matter what I do however, the AI seem to detect distance danger or fire so they start to move well before the trigger is fired.

 

I've tried changing to move waypoint to sentry, and even the behaviour to careless in order to try and make the AI stay still! No matter what I try however the AI will eventually wander and we'll have no AI to fight later because most have dispersed and prematurely sought out blufor.

 

I'd appreciate knowing how other editors may have managed circumventing this issue, or whether it is not common enough to confirm I'm simply doing something wrong.

 

Cheers - Anfo

Share this post


Link to post
Share on other sites

I'd usually not even have them on the map but instead spawn them when reinforcements are needed.  Either from a specific location to drive/fly in or from a sufficiently distance random location from the current action.

Share this post


Link to post
Share on other sites

Hello all

 

I have struggled with this problem for a little while so I was hoping to see how other editors manage to overcome it.

 

Take an opfor enemy squad, who you only want to advance from their placed position once blufor initiate a trigger. So my process which I presume matches most, is to create a move waypoint which is syncronised with a blufor activated trigger. No matter what I do however, the AI seem to detect distance danger or fire so they start to move well before the trigger is fired.

 

I've tried changing to move waypoint to sentry, and even the behaviour to careless in order to try and make the AI stay still! No matter what I try however the AI will eventually wander and we'll have no AI to fight later because most have dispersed and prematurely sought out blufor.

 

I'd appreciate knowing how other editors may have managed circumventing this issue, or whether it is not common enough to confirm I'm simply doing something wrong.

 

Cheers - Anfo

The absolute guaranteed way to make sure AI units won't do anything is to set enablesimulation false (or enablesimulationglobal false for MP) for each of the units in your enemy squad. You could set enablesimulation true in a trigger for when you want them to activate and do soldiery things. The downside is that the units will be completely immobile mannequins whilst enablesimulation false.

 

You could also try disableAI "MOVE", which keeps them stationary but still aware and able to shoot. 

Share this post


Link to post
Share on other sites

I'd usually not even have them on the map but instead spawn them when reinforcements are needed.  Either from a specific location to drive/fly in or from a sufficiently distance random location from the current action.

 

Thank you for a sneak-peek into your alternate methods.

 

@kylania, I've been burnt by a script that when a single trigger fired it spawned opfor AI wherever blufor happened to be on the entire map. It was a mess. Do you know a system you trust that will spawn X opfor in Y location?

 

The absolute guaranteed way to make sure AI units won't do anything is to set enablesimulation false (or enablesimulationglobal false for MP) for each of the units in your enemy squad. You could set enablesimulation true in a trigger for when you want them to activate and do soldiery things. The downside is that the units will be completely immobile mannequins whilst enablesimulation false.

 

You could also try disableAI "MOVE", which keeps them stationary but still aware and able to shoot. 

 

@tpw, how would I link and configure the trigger to a group of opfor soldiers?

 

Share this post


Link to post
Share on other sites

Thank you for a sneak-peek into your alternate methods.

 

@kylania, I've been burnt by a script that when a single trigger fired it spawned opfor AI wherever blufor happened to be on the entire map. It was a mess. Do you know a system you trust that will spawn X opfor in Y location?

 

 

@tpw, how would I link and configure the trigger to a group of opfor soldiers?

 

 

Here's a quick example. I set up a group of opfor with a simple move waypoint.

 

editor1.jpg

 

I name the leader of the opfor group "enemy1", and in his init I put the code to disable simulation for the group

editor2.jpg

 

Then I set a trigger up with some code in its activation field to enable the simulation for enemy1's group:

 

editor3.jpg

 

Once a blufor unit sets the trigger off then it will activate simulation for the opfor and they'll come and make life difficult for you.

 

 

Hope this helps.

  • Like 1

Share this post


Link to post
Share on other sites

A teacher after my own heart - thank you tpw

Share this post


Link to post
Share on other sites

Cheers bro. Those pictures saved me 3000 words of typing.

Share this post


Link to post
Share on other sites

Are you sure you sync the right waypoint with the trigger? sync-ing replaces the condition of a waypoint's completion, that means you need two waypoints, wp1 is where they need to stay put and this is the waypoint you sync, wp2 is the waypoint they're supposed to attack

in any case i hate disabling the AI simulation of movement since it renders them defenseless and in cooperative your commander might just lead you to them before they get a chance to ambush/reinforce

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  

×