Thread: Tiles You on
View Single Post
  #5  
Old 08-02-2006, 07:06 AM
ZeekTheMan2 ZeekTheMan2 is offline
Zeek Is The Man
ZeekTheMan2's Avatar
Join Date: Feb 2006
Location: Ohio
Posts: 12
ZeekTheMan2 is on a distinguished road
Send a message via AIM to ZeekTheMan2
PHP Code:
//function onActionServerSide() {
if (params[0] == "walking") {
  
clientr.walking = true;
}
if (
params[0] == "not walking") {
  
clientr.walking = false;
}
//}
//#CLIENTSIDE

function onCreated() {
  
disabledefmovement();
  
this.walking = 0;
  
this.speed = .94568;
}
function 
onTimeout() {
 if (
clientr.walking == true){
  
client.walkingz --;
}
  if (
client.walkingz <= 0) {
    
triggeraction(0, 0, "serverside", "-System_Movement", "not walking");
    
setani("idle", NULL);
  }
  if (
keydown(0)) {
    
triggeraction(0, 0, "serverside", "-System_Movement", "walking");
    
player.y -= this.speed;
    
player.dir = 0;
    
setani("walk", NULL);
    
client.walkingz = 2;
  }
  if (
keydown(2)) {
    
triggeraction(0, 0, "serverside", "-System_Movement", "walking");
    
player.y += this.speed;
    
player.dir = 2;
    
setani("walk", NULL);
    
client.walkingz = 2;
  }
  if (
keydown(1)) {
    
triggeraction(0, 0, "serverside", "-System_Movement", "walking");
    
player.x -= this.speed;
    
player.dir = 1;
    
setani("walk", NULL);
    
client.walkingz = 2;
  }
  if (
keydown(3)) {
    
triggeraction(0, 0, "serverside", "-System_Movement", "walking");
    
player.x += this.speed;
    
player.dir = 3;
    
setani("walk", NULL);
    
client.walkingz = 2;
  }
  if (
onwater(player.x + 1.5 + (vecx(player.dir)*0.1), player.y + 2 + (vecy(player.dir)*0.1))) {
    
setani("swim", NULL);
  }
  
this.tile = tiletype(player.x, player.y);
  
this.tile2 = tiletype(player.x + 1.5, player.y);

  if (
this.tile == 3 && this.tile2 == 3) {
    
setani("sit", NULL);
  }
  elseif (
this.tile == 4 && this.tile2 == 4) {
    
setani("sleep", NULL);
  }
}
setTimer(0.05); 
So this is what i got now and i need a little help on the onwall stuff and yea kuji they work just the sit one is a little off though. And i well be making the grab stuff when i get the on wall stuff done

Last edited by ZeekTheMan2; 08-02-2006 at 07:07 AM.. Reason: spelling error
Reply With Quote