TAMods  0.4
Customization mod for Tribes:Ascend
Classes | Functions | Variables
DamageNumbers.h File Reference

Go to the source code of this file.

Classes

struct  DamageNumber
 
struct  DamageNumberArray
 

Functions

void onDamageNumberCreate (DamageNumberArray dam_nums, number damage_value, Vector4 location, boolean is_shield)
 
void onDamageNumberUpdate (DamageNumberArray dam_nums, HUD hud, number time_delta)
 

Variables

number damageNumbersLimit
 
number damageNumbersOffsetX
 
number damageNumbersOffsetY
 
number damageNumbersScale
 
boolean showDamageNumberStream
 
boolean showChainBulletHitCount
 
number damageNumberStreamTimeout
 
string damageNumberCustomText
 
boolean showRainbow
 
Color damageNumbersColorMin
 
Color damageNumbersColorMax
 

Function Documentation

void onDamageNumberCreate ( DamageNumberArray  dam_nums,
number  damage_value,
Vector4  location,
boolean  is_shield 
)

This function will be called everytime a damage number is created, and will replace the default behaviour

You have to implement this function if you want to override the default damage number behaviour

Parameters
dam_numsThe array that holds the already existing damage numbers
damage_valueThe damage done and that will be displayed by the damage number
locationThe 4d world position of the damage number
is_shieldIf the damage number is shield (as in base turret or sensor shield) damage
void onDamageNumberUpdate ( DamageNumberArray  dam_nums,
HUD  hud,
number  time_delta 
)

This function will be called once per frame to update the damage numbers, and will replace the default behaviour

You have to implement this function if you want to override the default damage number behaviour

Parameters
dam_numsThe array that holds the already existing damage numbers
hudThe HUD object that will allow you to draw the damage number and do variour things
time_deltaThe time that passed since the last frame

Variable Documentation

string damageNumberCustomText

The text that the damage numbers will show instead of the damage

Color damageNumbersColorMax

The color that the damage numbers will take as they fade out

By default this color is red

Color damageNumbersColorMin

The initial color taken by the damage numbers

By default this color is white

number damageNumbersLimit

Damage amount that needs to be done before damage numbers show up

number damageNumbersOffsetX

Horizontal location of the damage numbers, relative to where they normally spawn

number damageNumbersOffsetY

Vertical location of the damage numbers, relative to where they normally spawn

Keep in mind that a positive value will make the numbers appear lower, and a negative value will make them higher

number damageNumbersScale

The scale of the damage numbers

The default value is 1.0, 0.5 is half the size, etc

number damageNumberStreamTimeout

The number of seconds without hits needed to restart the damage numbers stream or bullet count

boolean showChainBulletHitCount

If the damage numbers should show the number of hits done in a row instead of the damage done

boolean showDamageNumberStream

If the damage numbers should add up the damage done instead of counting individual hits

boolean showRainbow

If the damage number colors should change dynamically in rainbow colors