Game Development Reference
In-Depth Information
The little e symbol in the Constraint field means that it can take an expression, a
one-line statement. This is done for simple checks and saves us from writing the
code for a custom action node. Besides the basic Boolean test in this example, many
other simple expressions can be created, for example, if we had an integer for an
enemy's ammo amount, it can do a check to see how much ammo the character has,
and if it is empty, it can stop attacking and instead go get more ammo. We can also
have a check on an entity's health or HP, and if it's too low, a character can run away
instead of fighting with the player. However, let's get back to our demo.
If we run the demo now, the ship will behave the same as before, but if we go into
the memory for the character and change donePatrolling to true, the ship will do
nothing when we start the demo:
Search WWH ::




Custom Search