Thread: Little help.
View Single Post
  #8  
Old 02-02-2009, 10:20 PM
Unkownsoldier Unkownsoldier is offline
Ignorance has no future
Join Date: Sep 2008
Posts: 1,287
Unkownsoldier is on a distinguished road
Still doesnt work but I will try experimenting

//#CLIENTSIDE

//up
if (playerdir=0){
this.x=playerx-10;
this.y=playery-20;
}
//left
if (playerdir=1){
this.x=playerx-10;
this.y=playery-10;
}
//down
if (playerdir=2){
this.x=playerx+0.4;
this.y=playery+10;
}
//right
if (playerdir=3){
this.x=playerx-10;
this.y=playery-10;
}
function onKeyPressed(c, k) {
if (k == "a") {
replaceani("idle", "idle");
replaceani("walk", "walk");
setani("idle", NULL);
}
}

if (weaponfired) {
setani pancho_katana-attack,;
replaceani idle,pancho_katana-idle;
replaceani walk,pancho_katana-walk;

}





function onWeaponFired() {
temp.dx = player.x + vecx(player.dir) * 1.5;
temp.dy = player.y + vecy(player.dir) * 2;
triggeraction(dx, dy, "AttackPlayer", player.account, .5);
}

function onActionAttackPlayer(acc, damage) {
if (acc == player.account) {
return; // this ends the function
}
if (damage <= 0) {
return;
}

hurt(damage);
setAni("HURTGANI", null);
}
__________________
Look beyond the monitor.
Reply With Quote