Thread: shorter way?
View Single Post
  #1  
Old 08-14-2007, 04:12 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
shorter way?

is there a shorter way to do this?

PHP Code:
  if ( player.dir == 0) {
    if ( 
tiletypeintthis.x), int(this.y-1)) != 22)
      goto( 
int(this.x), int(this.y-1));
  }
  
  else if ( 
player.dir == 1) {
    if ( 
tiletypeint(this.x-1), int(this.y)) != 22)
      goto( 
int(this.x-1), int(this.y));
  }
  
  else if ( 
player.dir == 2) {
    if ( 
tiletypeint(this.x), int(this.y+1)) != 22)
      goto( 
int(this.x), int(this.y+1));
  }
  
  else if ( 
player.dir == 3) {
    if ( 
tiletypeint(this.x+1), int(this.y)) != 22)
      goto( 
int(this.x+1), int(this.y));
  } 
__________________
Deep into the Darkness peering...
Reply With Quote