Thread: findpathinarray
View Single Post
  #6  
Old 12-06-2007, 12:10 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Crow View Post
"tiles where we may stop" <-- Those tiles maybe?
If such is true... Then...

PHP Code:
allowedToWalk = new[level.width][level.height];
notAllowedToWalk = new[level.width][level.height];
allowedToStop = new[level.width][level.height];
tileShouldNotStop = new[level.width][level.height];
tileShouldStop = new[level.width][level.height];
tileShouldStopdest.xdest.] = 1;
for ( (
every tile in level) as tile)
  {
    
allowedToWalktile.xtile.] = !onwalltile.xtile.);
    
notAllowedToWalktile.xtile.] = onwalltile.xtile.); // Eh? Isn't this implicit from the last param?
    
tileShouldNotStoptile.xtile.] = !tileShouldStop[tile.xtile.y]; // Implicit?
  
}

findpathinarray(allowedToWalknotAllowedToWalktileShouldStoptileShouldNotStopIdontKnowstartXstartY100); 
That would be my best guess at the syntax. Though, I have done zero attempt to confirm this, and there is a Parameter that I am unsure about. ( This is pseudo-code. )
Reply With Quote