Ipos are created with keyframes and are used to animate objects in a lot of ways.
The actuator consist of an Ipo types menu, and a set of buttons listed below:
- Applies the Ipo as force: this means that the object will not try to go through solid object. Normally it follows the Ipo curve and ignores other objects. Selecting Force makes a L button appear, for use of local/global coordinates.
- Ipo curves are normally defined globally, which means the object will jump back to the position where the animation was recorded. With Add the animation is instead added to the object’s position. Selecting Add makes a L button appear, for use of local/global coordinates.
- Sta (start)
- Defines which frame the animation will start at.
- Defines which frame is the last in the animation.
- Whether children’s Ipos should be updated as well.
- Choose a property which will store the frame the animation is currently on through the animation.
There are six Ipo types:
- Plays the animation from start to end, and then resets.
- Ping Pong
- Plays the animation from start to end, next time the actuator is activated it plays from end to start.
- Plays from start to end, only as long as the actuator is activated. When it is not, it plays backward back to the start.
- Loop Stop
- Plays from start to end, only as long as the actuator is activated. When it is not, the animation is paused and continued once the actuator is activated again. When it reaches the end frame, the animation starts over again.
- Loop End
- Plays the animation from start to end and then restarts.
- For as long as the actuator is activated the animation will be controlled by the property assigned in the field replacing Start and End button. The property assigns the frame number.
You want to make a health bar which visualizes the players hp without numbers. You create a cube, move it (in Edit mode) so that the centre is in one end of the object. You stretch it out and scale it to the size you want it to be when the health is full. You decide 100 is the max hp and insert a scale keyframe at frame 100. Then you move to frame 0 and scale the object down along the right axis to zero and insert a scale keyframe. The animation will now consist of your health bar filling up between frame 0 and 100. You set up a Copy Property actuator to copy the property hp of the player to the health bar’s property hp. Next you set up an Always sensor and AND controller and Ipo actuator in Property mode. As property you choose the hp property.
When the property hp is changed, the life bar will scale to the frame with that number. As frame 0 is no health and frame 100 is full health bar it will correspond to the property.