Basically, I have one, apparently very powerfull, baddy. I can't damage it.
Here's some parts of the scritps used for attacking it, it's mostly triggeractions, but AI can't find out what's failing, since it's all going through

First, the action triggered by punching:
PHP Code:
triggeraction(player.x+1+vecx(player.dir)*2.1,player.y+1.5+vecy(player.dir)*2.1,"hurt","hurt",clientr.attack);
This is received by the baddy:
PHP Code:
function onActionhurt()
{
if(params[0]=="hurt")
{
this.hp-=params[1];
chat=this.hp;
triggeraction(x,y,"hp","hp",this.hp);
if(this.hp<=0)
{
this.hp=int(random(15,25));
triggeraction(0,0,"serverside","-System","exp",1,"secure");
hide();
settimer(random(10,20));
}
}
}
function onCreated()
{
setshape(1,32,32);
this.hp=int(random(15,25));
}
Which triggers the client of the baddy, for the hp variable to exist on clientside as well:
PHP Code:
function onActionhp()
{
this.hp=params[1];
}
function onCreated()
{
this.direct=2;
setimg("dr_baddy_spider.png");
setshape(1,32,32);
onTimeout();
}
Now...what's not working???
The hp doesn't go down, yet the actions are received.
=(