Damage Location Indicator
by Chris "C2" Byars · in Torque Game Engine · 03/03/2006 (5:56 pm) · 2 replies
I'm looking into getting locational damage indicators, basically 4 images that are located near the four sides of the screen, that appear if you are taking damage from that direction, and then fade away. Has anyone done this?
Could anyone point me in the right direction of doing this? Possibly script-only by using some "get Damage Vector" type thing to see what side/angle you're being fired upon and display a bitmap as such?
Thanks in advance! :)
Could anyone point me in the right direction of doing this? Possibly script-only by using some "get Damage Vector" type thing to see what side/angle you're being fired upon and display a bitmap as such?
Thanks in advance! :)
#2
Using:
That reports the location in the world the player is damaged at. What, instead of %pos, would I use to report the directional location, or angle, of the damage?
03/03/2006 (7:10 pm)
According to what I've found searching around, getDamageLocation() in fact reports whether the shot occurred front, back, left, or right. I just have to figure out how to get that information from the getDamageLocation(). Using:
%col.getDamageLocation(%pos);
echo("Location: " @ %pos);That reports the location in the world the player is damaged at. What, instead of %pos, would I use to report the directional location, or angle, of the damage?
Torque Owner Josh Moore
Edit: It might be worth suggesting to use the "setDamageFlash" method for this by passing it a position and rendering the flash as a gradient across the screen.