function Player::PlayerShoot( shooter, weapon, hitEntity, hitPosition )
{
if( hitEntity && hitEntity.Type == OBJ_PLAYER && shooter == ::pInfo.Instance )
{
local damaged_player = hitEntity;
Console.Print( "Target's health: "+ damaged_player.Health +"" );
Why is it that the player's, getting damaged, health is not updating while I'm shooting at him? Bear in mind that ::pInfo.Instance is basically the instance of the user.
Quote from: KuRuMi^ on Dec 27, 2018, 07:14 PMfunction Player::PlayerShoot( shooter, weapon, hitEntity, hitPosition )
{
if( hitEntity && hitEntity.Type == OBJ_PLAYER && shooter == ::pInfo.Instance )
{
local damaged_player = hitEntity;
Console.Print( "Target's health: "+ damaged_player.Health +"" );
Why is it that the player's, getting damaged, health is not updating while I'm shooting at him? Bear in mind that ::pInfo.Instance is basically the instance of the user.
Okay, for some reason, it's giving the right information to the player getting shot instead of the shooter. Strange. 0.o
In conclusion, PlayerShoot seems like a global callback, yet stating the if statements whether the shooter or hitEntity is the user's instance, the code based from its statement will run to that player's game.