Jump to content
Sign in to follow this  
Joe98

How to script: F2 1 6

Recommended Posts

I am commanding an AI soldier.

To select that soldier I hit F2

To make that soldier stop I hit: F2 1 6

My plan is that when a trigger fires that man stops.

How can I put F2 1 6 into a script?

.

Share this post


Link to post
Share on other sites

If your using a trigger in the editor then you could do :

doStop unitName;

And use either:

unitName doMove (getPos player);
unitName doFollow (leader group unitName);

replace unitName with the unit's name.

Share this post


Link to post
Share on other sites

To add to what Rejenorst said: there are two sets of commands: the "do" and the "command" variants. The firmer (e.g. "doStop") are silent, while the latter (e.g. "commandStop") make the commander issue/say that command over radio first.

And yep, the counterpart to "do-/commandStop" is "do-/commandFollow". Also note that if you issue a "do-/commandMove", the unit will immediately return to follow the formation of the group, once "unitReady". Thus, if you need to have a unit stay at some certain spot, you need to first issue the move command, then you need to wait until the unit is ready, and the moment it is, you issue the stop command. And then the unit will actually stay there - that is, unless it will engage an enemy. To prevent that you could disable movement by forcing speed to 0, or you could "disableAI" targeting.

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  

×