player health
by Very Interactive Person · in Torque Game Engine · 08/31/2001 (8:55 am) · 4 replies
how can i get a players health? %player.what? or how do i do this?
#3
09/01/2001 (10:39 am)
yeah.. but what if i dont want to do it that way... i just want a number to appear... that can be done trough sripts... so how do i get that value?
#4
But if you wish to do this through script you have 2 options:
%client.getcontrolobject().getDamageLevel();
%client.getcontrolobject().getDamagePercent();
Both return decimal numbers.
getDamageLevel returns the numerical amount of damage from 0 to %player.maxDamage (In the example 0.66)
getDamagePercent returns the percentage of damage the object (Player) has taken.
Basically this would give you an inverted representation of the health scale so you will need to subtract the returned value from the base value to give a more accurate number.
09/02/2001 (8:43 pm)
The client should not have access to their health through scripts.But if you wish to do this through script you have 2 options:
%client.getcontrolobject().getDamageLevel();
%client.getcontrolobject().getDamagePercent();
Both return decimal numbers.
getDamageLevel returns the numerical amount of damage from 0 to %player.maxDamage (In the example 0.66)
getDamagePercent returns the percentage of damage the object (Player) has taken.
Basically this would give you an inverted representation of the health scale so you will need to subtract the returned value from the base value to give a more accurate number.
Associate Anthony Rosenbaum