Game Development Community

SetDamageFlash not "flashing

by PrvtHudson · in Torque Game Engine Advanced · 03/10/2007 (5:34 pm) · 2 replies

I get no damage flash.

When my player is damaged, I make it to the onDamage script. In the engine, I can see the mDamageFlash etc being set but I can't figure out where the flash is actually rendered. My player loses health ... just no flash. Any tips ?

function Armor::onDamage(%this, %obj, %delta)
...

%flash = %obj.getDamageFlash() + ((%delta / %this.maxDamage) * 2);
if (%flash > 0.75)
%flash = 0.75;
%obj.setDamageFlash(%flash);


EDIT :

LocalClientConnection.player.setDamageFlash(0.75); worked in 1.5 but not tgea. I could create a full screen shader to do the same. Anyone know if setDamageFlash works in TGEA ?

#1
03/19/2007 (4:18 pm)
I ended up implimenting the FULL_SCREEN_SHADERS resource and creating a red shader.

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9104
#2
03/19/2007 (9:25 pm)
Damage flash, whiteout and blackout are disabled in TGEA for replacement by a resource such as the above. :)