Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
galzohar

Giving AI a stop command at mission start

Recommended Posts

I don't want them to be uncontrollable, but I do want to give them a stop command as soon as the mission starts, or else they try going back in formation which usually results in them going for a swim and losing all their gear since the starting position is on the beach. I've tried various ways of using commandStop, however none of them worked reliably (some methods made it sometimes work, sometimes not). What's the proper way to prevent AI from walking back into formation as soon as mission starts?

Share this post


Link to post
Share on other sites

Did you try to place "commandstop this" to unit´s (squad members) init-box? That works at least when AI is squad leader.

Share this post


Link to post
Share on other sites

It works... once for every unit for every player, which makes the leader spam commands so fast it seems it's too fast for the game to handle, and a lot of bugs result of that (getting stuck in hand signal animation or something else that makes you unable to aim/shoot/see crosshair). So I need a better solution ;)

Share this post


Link to post
Share on other sites

How about bypassing it by placing the group inside a vehicle?

Just an idea :)

Share this post


Link to post
Share on other sites

That has its own (other) issues.

As a leader if you're fast enough (which you never are because of "receiving") you can stop the AI with no script, I don't see how it can be impossible to not have a script do it. The only problem is I have no idea how to properly do it.

Share this post


Link to post
Share on other sites

try the following:

dostop

disableAI "MOVE"

With disableai, you have to issue an enableAI command to get them moving again.

Share this post


Link to post
Share on other sites

I don't want them to be unable to move, I just want them to have a stop order, as if I selected all of them and used the "halt" command.

Share this post


Link to post
Share on other sites

In the units init line type:

doStop this

In addition you need to change their "Special field" from "In Formation" to "None". They then stop where you placed them and won't get into formation until you order them to do so.

Share this post


Link to post
Share on other sites

Yeah, of course I set them to "none" (or else they would start in the water rather than walking there).

The wiki says about doStop though:

Stopped unit will not be able to move or fire.

Doesn't that mean though that if a player takes over the unit it will still be unable to move? That's why I didn't try that earlier. I'd rather know what works before I try it with people, since, well, I don't want to bother people logging into a mission and then being unable to play it until I re-upload it a couple times until it works (done that too much already).

If doStop works then that's great, I just want to be sure. Again keep in mind this is a mission with respawn=SIDE (aka team switching enabled).

Share this post


Link to post
Share on other sites

Just try it and see, that's what mission betatesting is for. ;)

However I do not think that the doStop command has an effect on human players but only the AI.

Share this post


Link to post
Share on other sites

Nice with the doStop! And nopes, no effect on humans.

I was having problems getting my units to start in a staggered column and managed to overlook this command, but this solved all that :)

However ordering the soldiers to regroup still doesn't make them move. Looking into that atm.

Edited by Inkompetent

Share this post


Link to post
Share on other sites

Who needs to run this command? The one that has the group leader local? The one that has the unit local? Or anyone (including the server)?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×