|
Tiberian Technologies Scripts Reference Revision: 9000
|
Damage animation script. More...
#include <dp88_misc.h>
This is a generic damage animation script that allows you to choose the health thresholds at which different damage states are applied, rather than being tied into the 25%, 50%, 75% etc permitted by the damage bones mechanism.
You can create up to six damage states using this script, with both powered and unpowered versions of each state, however if you don't require all six states you can leave the extras unconfigured.
The first state is considered to be the 'healthy' state and is used when the object is above the first damage boundary. Each subsequent state is activated when the health of the object drops below the specified boundary, which is a percentage of total health. So, for instance, if you set boundary 1 to 70 and boundary 2 to 30 your object will animate as follows;
Health 71% - 100%: Healthy animation Health 31% - 70%: Damage animation 1 Health 1% - 0%: Damage animation 2
To use the WakeupObjects parameter, create an obbox object in max/gmax and name it WAKEBOX. Then set WakeupObjects to 1. Any time the object changes damage states, any objects in the WAKEBOX box will be forced awake so they can run their physics simulation (e.g. falling through newly-existing holes in the mesh
| animationName | Name of the animation containing all the damage state frames |
| loopAnimation | True if the damage animation should be played in a loop, false otherwise |
| healthy_startFrame | First frame number for the healthy state animation |
| healthy_endFrame | Last frame number for the healthy state animation |
| healthy_startFrame_lowPower | First frame number for the healthy state animation when power is offline, or -1 to use the same value as healthy_startFrame |
| healthy_endFrame_lowPower | Last frame number for the healthy state animation when power is offline, or -1 to use the same value as healthy_endFrame |
| damageBoundary1 | Damage percent boundary for the first damage state |
| damageBoundary1_startFrame | First frame number for the first damage state animation |
| damageBoundary1_endFrame | Last frame number for the first damage state animation |
| damageBoundary1_startFrame_lowPower | First frame number for the first damage state animation when power is offline, or -1 to use the same value as damageBoundary1_startFrame |
| damageBoundary1_endFrame_lowPower | Last frame number for the first damage state animation when power is offline, or -1 to use the same value as damageBoundary1_endFrame |
| damageBoundary2 | Damage percent boundary for the second damage state, or -1 to disable this state |
| damageBoundary2_startFrame | second frame number for the second damage state animation |
| damageBoundary2_endFrame | Last frame number for the second damage state animation |
| damageBoundary2_startFrame_lowPower | second frame number for the second damage state animation when power is offline, or -1 to use the same value as damageBoundary2_startFrame |
| damageBoundary2_endFrame_lowPower | Last frame number for the second damage state animation when power is offline, or -1 to use the same value as damageBoundary2_endFrame |
| damageBoundary3 | Damage percent boundary for the third damage state, or -1 to disable this state |
| damageBoundary3_startFrame | third frame number for the third damage state animation |
| damageBoundary3_endFrame | Last frame number for the third damage state animation |
| damageBoundary3_startFrame_lowPower | third frame number for the third damage state animation when power is offline, or -1 to use the same value as damageBoundary3_startFrame |
| damageBoundary3_endFrame_lowPower | Last frame number for the third damage state animation when power is offline, or -1 to use the same value as damageBoundary3_endFrame |
| damageBoundary4 | Damage percent boundary for the fourth damage state, or -1 to disable this state |
| damageBoundary4_startFrame | fourth frame number for the fourth damage state animation |
| damageBoundary4_endFrame | Last frame number for the fourth damage state animation |
| damageBoundary4_startFrame_lowPower | fourth frame number for the fourth damage state animation when power is offline, or -1 to use the same value as damageBoundary4_startFrame |
| damageBoundary4_endFrame_lowPower | Last frame number for the fourth damage state animation when power is offline, or -1 to use the same value as damageBoundary4_endFrame |
| damageBoundary5 | Damage percent boundary for the fifth damage state, or -1 to disable this state |
| damageBoundary5_startFrame | fifth frame number for the fifth damage state animation |
| damageBoundary5_endFrame | Last frame number for the fifth damage state animation |
| damageBoundary5_startFrame_lowPower | fifth frame number for the fifth damage state animation when power is offline, or -1 to use the same value as damageBoundary5_startFrame |
| damageBoundary5_endFrame_lowPower | Last frame number for the fifth damage state animation when power is offline, or -1 to use the same value as damageBoundary5_endFrame |
| wakeObjects | Whether to wake up objects that might be on top of this object |
| useDestroyedMode | Set this to 1 to cause the last damage state to be a "destroyed" state, which means that the animation will not change again until it is repaired to 100% health |