This page describes the nodes which directly interact with other parts of the Platformer Game Kit (unlike the General Nodes which could be reused in any other project).
Conditions
ConditionNode
s are like Leaf Nodes, but they immediately check a condition to return Result.Pass
or Result.Fail
(not Result.Pending
):
Node | Description |
---|---|
IsEnemyInFront |
Checks if an enemy of the Character is in front of them (for the monsters, the Player is their enemy). Generally used in a Sequence followed by TrySetState to attack the enemy. |
IsGroundInFront |
Checks if there is ground for the Character to stand on in front of them. Generally used in a Sequence followed by TurnAround . |
IsIdle |
Checks if the Character is currently in their Idle state. Generally used under an Invert node so that when the Character is not Idle the brain's main Selector stops early without executing the rest of its logic. For example, while attacking there's no point in trying to perform other actions. |
IsWallInFront |
Checks if there is a wall in front of the Character . Generally used in a Sequence followed by TurnAround . |
Leaves
LeafNode
s execute individual logic. Some have are General Nodes while others are specific:
Node | Description |
---|---|
FaceAttacker |
Registers a callback to the Health.OnCurrentHealthChanged event so that when the Character gets hit by an attack from behind they will turn around to face the attacker. This node is used by the Naga enemy in its On Awake tree rather than On Fixed Update since it only neede to be registered once. |
SetMovementForward |
Sets the Character.MovementDirectionX to be in whichever direction they are currently facing. This node is used by all enemies in their On Awake tree rather than On Fixed Update since it only neede to be set once. |
SetMovementSine |
Sets the Character.MovementDirectionY to cause them to fly up and down in a sine wave. This node is used by the Gobbat enemy. |
TrySetState |
Attempts to change the state of the Character.StateMachine . This node is used by all enemies to enter their Attack State after an IsEnemyInFront condition succeeds, but it would work with any Character State. |
TurnAround |
Flips the Character.MovementDirectionX to point the other way. |