Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
List of all members
dp88_damageAnimation Class Reference

Damage animation script. More...

#include <dp88_misc.h>

Detailed Description

Author
Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)

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

Parameters
animationNameName of the animation containing all the damage state frames
loopAnimationTrue if the damage animation should be played in a loop, false otherwise
healthy_startFrameFirst frame number for the healthy state animation
healthy_endFrameLast frame number for the healthy state animation
healthy_startFrame_lowPowerFirst frame number for the healthy state animation when power is offline, or -1 to use the same value as healthy_startFrame
healthy_endFrame_lowPowerLast frame number for the healthy state animation when power is offline, or -1 to use the same value as healthy_endFrame
damageBoundary1Damage percent boundary for the first damage state
damageBoundary1_startFrameFirst frame number for the first damage state animation
damageBoundary1_endFrameLast frame number for the first damage state animation
damageBoundary1_startFrame_lowPowerFirst frame number for the first damage state animation when power is offline, or -1 to use the same value as damageBoundary1_startFrame
damageBoundary1_endFrame_lowPowerLast frame number for the first damage state animation when power is offline, or -1 to use the same value as damageBoundary1_endFrame
damageBoundary2Damage percent boundary for the second damage state, or -1 to disable this state
damageBoundary2_startFramesecond frame number for the second damage state animation
damageBoundary2_endFrameLast frame number for the second damage state animation
damageBoundary2_startFrame_lowPowersecond frame number for the second damage state animation when power is offline, or -1 to use the same value as damageBoundary2_startFrame
damageBoundary2_endFrame_lowPowerLast frame number for the second damage state animation when power is offline, or -1 to use the same value as damageBoundary2_endFrame
damageBoundary3Damage percent boundary for the third damage state, or -1 to disable this state
damageBoundary3_startFramethird frame number for the third damage state animation
damageBoundary3_endFrameLast frame number for the third damage state animation
damageBoundary3_startFrame_lowPowerthird frame number for the third damage state animation when power is offline, or -1 to use the same value as damageBoundary3_startFrame
damageBoundary3_endFrame_lowPowerLast frame number for the third damage state animation when power is offline, or -1 to use the same value as damageBoundary3_endFrame
damageBoundary4Damage percent boundary for the fourth damage state, or -1 to disable this state
damageBoundary4_startFramefourth frame number for the fourth damage state animation
damageBoundary4_endFrameLast frame number for the fourth damage state animation
damageBoundary4_startFrame_lowPowerfourth frame number for the fourth damage state animation when power is offline, or -1 to use the same value as damageBoundary4_startFrame
damageBoundary4_endFrame_lowPowerLast frame number for the fourth damage state animation when power is offline, or -1 to use the same value as damageBoundary4_endFrame
damageBoundary5Damage percent boundary for the fifth damage state, or -1 to disable this state
damageBoundary5_startFramefifth frame number for the fifth damage state animation
damageBoundary5_endFrameLast frame number for the fifth damage state animation
damageBoundary5_startFrame_lowPowerfifth frame number for the fifth damage state animation when power is offline, or -1 to use the same value as damageBoundary5_startFrame
damageBoundary5_endFrame_lowPowerLast frame number for the fifth damage state animation when power is offline, or -1 to use the same value as damageBoundary5_endFrame
wakeObjectsWhether to wake up objects that might be on top of this object
useDestroyedModeSet 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