Stances
Ingame you can cycle through stances by using the Ctrl + Z hotkey.
There are a couple of simple things being controlled:
- whether the unit retaliates when it takes damage
- whether the unit scans for targets and engages them automatically
- whether the unit is allowed to move
HoldFire turns all of that off, the unit will only accept targets from the player
ReturnFire turns off the scanning, but will engage a unit that fires upon you (provided it does at least 1hp of damage)
Defend enables scanning and retaliation, but prevents the unit from chasing a target
AttackAnything scans, retaliates, and chases things
- Ground units in most cases by default are to set Defend (from 20151031 onwards) or AttackAnything
- Submarines are set to HoldFire
Setting the initial stance of a unit type
The initial stance of an actortype is defined on the AutoTarget
trait.
You can differentiate between the initial stance a player-controlled and a bot-controlled unit has.
The player-controlled stance is defined on the InitialStance
property while the bot-controlled stance is customizable on the InitialStanceAI
property.
The following example will further explain the usage:
e1:
AutoTarget:
InitialStance: ReturnFire
InitialStanceAI: ReturnFire
Setting the initial stance of a single unit
In map.yaml
you can change the initial stance of single units by adding a StanceInit
(just Stance: <value>
in yaml).<br >
You do this on the actor definition in the Actors
section:
myactor: e1
Location: 17,112
Owner: Multi0
Stance: Defend
In lua you can just set the stance of individual units runtime:
myactor.Stance = HoldFire
Players ๐ฒ
- FAQ โ
- Installation ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ