Behaviors

From GalaxyWiki
Jump to: navigation, search

Behaviors are created through the Data editor and used for causing effects which require no action by players/triggers (with some exceptions, see the effect Apply Behavior). For example behaviors can add a speed buff to a unit temporarily or add resources onto a unit.

Attribute[edit]

The Attribute Behavior is used to create custom attributes (or stats) for your units. Essentially it allows you to add modifications (i.e. higher health, attack damage, movement speed, etc.) per attribute point to a unit with the Behavior. The best example of this is an RPG system, wherein the hero can gain something like strength (which perhaps modifies damage) or constitution (which can modify health) upon leveling up.

For a more in-depth explanation, check out Leveling units, Attributes (Stat Boosts), and Attribute Behavior Modification.

Buff[edit]

Buffs are the most common kind of Behavior. Buffs can modify a units properties (i.e. speed, life, shields), they can also cause Effects. It can do this for specific time frames (e.g. duration period, permanent, once). Buffs are very versatile in what they can accomplish and so are used for many things.

Click Response[edit]

Click Response activates an effect when a unit with the Behavior is clicked. You can make this take a certain number of clicks or add a percentage chance that the effect will happen on a click.

Conjoined[edit]

Units with the Conjoined Behavior will share health if they are in the specified range of each other.

Creep Source[edit]

The Creep Source Behavior causes a unit to spawn creep. The size of the creep is controlled by several footprints. These footprints control the starting size (game, unit creation or construction) and the size it will eventually grow to. You can set the amount of time between creep growths.

Jump[edit]

The Jump Behavior is used for actions like the reapers ability to jump cliffs. You can set the minimum and maximum height differences, so it is possible to have the reaper jump a double cliff.

Power Source[edit]

Power Source is the Behavior used by pylons to provide power. This Behavior is used to supply power to any unit using the Power User Behavior.

Power User[edit]

The Power User Behavior is used by Protoss buildings that need to be built in the range of a pylon. The Behavior should be given to any unit that needs to be in range of a Power Source unit.

Resource (Behavior)[edit]

The Resource Behavior is used to turn a unit into a resource.

Reveal[edit]

Reveal is used for attack reveal (Set in Gameplay Data). Editing the length of the attack reveal can be done by editing the already created Attack Reveal Behavior.

Spawn[edit]

Spawn will constantly spawn unit(s) at specified offsets around the unit with the Behavior. You can also cause an effect to occur when the unit(s) spawn.

Veterancy[edit]

Unit leveling can be done by adding a Veterancy Behavior to the unit. Some things in the Veterancy Behavior that you can specify are the amount of experience needed for each level, the abilities enabled and disabled for each level, the fraction of experience shared with other units, and the radius required for sharing experience.

See the unit leveling wiki for more in-depth descriptions.

Wander[edit]

The Wander Behavior is used to cause units to move randomly around the map. This Behavior is used for critters. You can add a leash to keep the unit from wandering to far away from its original position. Units with the Wander Behavior will attack enemies if they are encountered.