TakeDamage can only give 0.5 hearts
#2
Which of the three functions are you using? In C++ there are these declarations (all exported to Lua):
Code:
/// Makes this pawn take damage from an attack by a_Attacker. Damage values are calculated automatically and DoTakeDamage() called
void TakeDamage(cPawn & a_Attacker);

/// Makes this pawn take the specified damage. The final damage is calculated using current armor, then DoTakeDamage() called
void TakeDamage(eDamageType a_DamageType, cPawn * a_Attacker, int a_RawDamage, double a_KnockbackAmount);

/// Makes this pawn take the specified damage. The values are packed into a TDI, knockback calculated, then sent through DoTakeDamage()
void TakeDamage(eDamageType a_DamageType, cPawn * a_Attacker, int a_RawDamage, int a_FinalDamage, double a_KnockbackAmount);
So I think something like TakeDamage(dtEnvironment, nil, 4, 0); should call the middle variant, giving 2 hearts of environmental damage with zero knockback.
Reply
Thanks given by:


Messages In This Thread
TakeDamage can only give 0.5 hearts - by NiLSPACE - 04-09-2013, 12:39 AM
RE: TakeDamage can only give 0.5 hearts - by xoft - 04-09-2013, 01:12 AM
RE: TakeDamage can only give 0.5 hearts - by xoft - 04-09-2013, 02:05 AM
RE: TakeDamage can only give 0.5 hearts - by xoft - 04-09-2013, 04:45 AM
RE: TakeDamage can only give 0.5 hearts - by xoft - 04-09-2013, 06:14 AM



Users browsing this thread: 3 Guest(s)