Thread: Tile Checking
View Single Post
  #3  
Old 07-22-2008, 04:54 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by DustyPorViva View Post
Well you can run a loop when the player enters a level like...

PHP Code:
function onPlayerenters() {
  for (
i=0;i<64*64;i++) {
    if (
tiles[i%64,int(i/64)] == watertilehex) {
      
this.levelcontainswater true;
      break; 
// no need to check for more water, right?
    
}
  }

I guess, but I want it to be a little more simple to blend with the script it'll be put into, so I just want to know how to find a tile "blank"x"blank"
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote