View Single Post
  #17  
Old 12-24-2012, 06:48 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Thanks dude xD

Okay i now have:

PHP Code:
// Scripted by *Trakan
//#CLIENTSIDE
function onKeyPressed(keyCode, keyName, scanCode) {
  if (
keyName == "e") {
    if (
player.dir == 3 && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.i = 0; temp.i < 4; temp.i++) {
        
player.x += 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == 1 && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.i = 0; temp.i < 4; temp.i++) {
        
player.x -= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == 0 && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.i = 0; temp.i < 4; temp.i++) {
        
player.y -= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }

  if (
player.dir == 2 && !indodge) {
    
freezeplayer(1.5);
    
setani gh_gani_roulade, ;
    
set indodge;
    for (
temp.i = 0; temp.i < 4; temp.i++) {
      
player.y += 1;
      
sleep(.1);
    }
    
sleep(0.5);
    unset 
indodge;
    
setani idle, ;
  }
}
} 
It's work fine! But.. players can go in blocking tiles as i say before. How can I select the tiles that I do not want the player went on?

Last edited by Trakan; 12-24-2012 at 07:33 PM..
Reply With Quote