I have done a bunch a tweaks and stuff to get this baddie to do what i want it to do. but for some reason, when the baddie attacks me, i cant get the clientr.stats_HP to go down
PHP Code:
function damagePlayer()
{
temp.randomize = int( random( 0, 101 ) );
temp.plyr = findPlayer( this.plyr );
if ( plyr.hearts > 0 )
{
if ( randomize in | 0, 92 | )
{
setCharAni( "natrius_ironsword_swing2", NULL );
plyr.stats_HP -= int( random( 0.5, 1 ) ); // <------------
}
}
else if ( randomize in | 99, 101 | )
{
if ( this.health[ 0 ] < this.health[ 1 ] )
{
if ( ( this.health[ 0 ] + 5 ) < this.health[ 1 ] )
{
healBaddy( int( random( 0, 6 ) ) );
}
else if ( ( this.health[ 0 ] + 5 ) >= this.health[ 1 ] )
{
healBaddy( this.health[ 1 ] );
}
}
}