🧊Zones
(Needs Update)
Last updated
(Needs Update)
Last updated
Zones are Triggers that Enable Logics on the Animal, like Jump, Actions, Deaths... etc. Once an animal Enters a Zone it can be activated via Input or Automatically.
A zone requires any type of collider set as Trigger.
The Layer set on the GameObject must be different from the Layers set on the Ground Layer in the Animal Controller. Usually is set as Ignore Layer
As soon as the animal enters the zone it will activate the zone logic. If set to false you need to manually call: Zone.Activate()
Disables the zone after it's used 1 time.
How many characters can use this zone at the same time. If set to a negative value (-1) then it has no limit.
As above, which collider is the trigger for the zone to activate
Which layer should be used to detect the animal
A zone can modify a Mode, Force, State, or Stance on an animal, depending the Action set in the Zone.
Which Mode ID should activate
Which ability should activate. See the Modes documentation for more information
When the Mode is Set to Action, the Ability Index Parameter it will automatically change to Action ID to help you better which Action Index to play on the Animal
How should the Mode be played?
Value assigned to the mode float value when using the zone
Plays a mode no matter if a mode is already playing
When the Zone is set to State, The animal will automatically make an State Action if it enters the Zone Trigger.
ID of the State to modify e.g. Fly, Death etc.
The zone can have different enter and exit actions:
Activate a State on an Animal.
Some States cannot exit on their on because some conditions may need to be completed. Calling the Method: State.AllowExit() on the Animal permits the state to exit and other states with lower priority to try to activate themselves.
For Example: A character is Flying; then enters A Fly State Zone with Allow Exit set, this will allow other States like Fall to be activated since the Fly State is allowing lower priority states to be active.
Some States cannot be activated on their on, because it may require some conditions to be completed. This action forces any state to be Active.
E.g.: The Swim State can only be Activated if the animal touches the water. but it can be forced using this action.
Disable a State on an Animal.
E.g.: you can have a Jump State Zone to Disable the Jump State when a character enters a room.
If a State on an animal is Disabled, it will enable it back.
E.g.: you can have a Jump State Zone to Enable the Jump State when a character exits a room.
Sets the Exit status on the Animator to be true
When the Zone is set to Stance, The animal will automatically make an Stance Action if it enters the Zone Trigger.
ID of the Stance to modify.
The zone can have different enter and exit actions.
On Entering the Trigger Zone: the Current Stance on the Animal will be equal to the Zone Stance ID.
On Exiting the Trigger Zone: the Current Stance on the Animal will be equal to the Zone Stance ID.
Set's the default stance to the stance specified in the StanceID
Amount of Force that gets applied to the animal
Acceleration to apply the force when the animal enters the zone
Set a value for the drag applied when the animal exits the zone
Set a limit for the total amount of force to apply
Can the animal be controlled whilst in the air?
Changes if the animal is grounded when entering the force zone
Probability to activate the zone when entering the zone 0 - 1. 0 = 0%. 0.5 = 50%, 1 = 100%.
Limit the activation of the zone from certain angles only
Removes the stored Animal on the zone when the zone is activated, resetting it to it's default state
Set this parameter only if you want the zone to activate with certain gameobjects with tags.
Activate when a bone enters the zone. The bone needs it's own collider.
Name of the bone to check if Bone Only is true.
Invoked when the Animal Enters the Zone Trigger
Invoked when the Animal Exits the Zone Trigger
Invoked when the Animal Activates the Zone
Invoked when the zone fails to activate for whatever reason e.g. the wrong animal walks into it