View Single Post
  #38  
Old 01-15-2014, 04:34 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
I took what was read above into consideration. Thank you. But I am running all pvp actions via Clientside.

With that said, I am having issues and can't find out why this won't work.

This is the script for the weapon "Combat"
PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey){
 if (
key == "s"){
  
setAni("sword"NULL)'
  if (player.x in |this.x-2, this.x + 1| && player.y in |this.y-1, this.y + 3|) {      
     triggerAction(player.x, player.y, "SYSTEM/damage", "Hurt");
     }
    }
   } 
And this is the weapon for my damage system:
PHP Code:
//#CLIENTSIDE
function onHurt(){
 
setAni("hurt"NULL);
 
player.chat "HURT!";
 } 

It's not triggering the function.

I know the x1,x2 and y1,y2 and a little outa wack. I'm just testing with the player.dir == 3
Reply With Quote