Component Pack: State Machine and Health
Platform:
Description:
This free bonus pack gives you two useful building blocks for your game: a health component and a finite state machine. Both of these components are heavily used in our upcoming game, Grunts.
Every game needs to track health. The health component does all the book-keeping for you. It dispatches events on the entity when healing or damage occurs. It tracks how long it has been since the last time the unit was damaged - useful for doing damage effects. There is a damage method to make it easy to inflict damage on your entities, and you can modify damage based on type.
Finite state machines let you model complex behavior in a flexible way. If you have complex behavior for your enemies, a state machine is perfect for modelling it. If you want to drive animations with appropriate transitions, a state machine is a great tool to make sure everything shows up right. In Grunts, we use this state machine code to not only help drive our AI but also to make sure our hundreds of frames of animation show up at the right time.
(These components come standard with the SDK.)
FEATURES
- This same code used heavily in Grunts, our upcoming Flash game.
- Complete health component implementation.
- Fires events when unit is damaged or healed.
- Tracks time of last damage for damage effects.
- Supports different damage types.
- Finite State Machine to help you build complex gameplay.
- Extensible - write your own states, transitions, and machines.
- Includes two transitions and three states.
Requirements:
PushButton Engine
Licenses and Prices:
Reviews
We are using this in Grunts and it's become very useful for handling all the different animation and AI states the enemy grunts need to go through during each wave.

