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