View Single Post
  #13  
Old 08-31-2007, 06:55 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I think I've finally 'fixed' the problem. Instead of finding water every time it warps, I'm simply going to have a 256 loop when it's created, and check every 4x4 square, and if it's water, add it to an array, and when it's time to warp, pick it's position from the array.

EDIT: seems this is not working...
PHP Code:
  this.gmapo={int(thiso.x/64),int(thiso.y/64)};
  
this.waterspots = new[256];
  for (
i=0;i<256;i++) {
    
this.waterspots[i]=i;
    if (!
onwater2((this.gmapo[0]*64)+((i%16)*4),(this.gmapo[1]*64)+(int(i/16)*4),4,4)) {
      
this.waterspots[i]=-1;
      
showimg(i+500,"door.png",(this.gmapo[0]*64)+((i%16)*4),(this.gmapo[1]*64)+(int(i/16)*4));
    }
  } 
The point of this is to run through the level and whatever is NOT water, erase it from the array. Now, even besides that, check out the showimg bit. It should show a door at ever 4x4 square that is NOT water. It shows doors throughout the whole level, even where there is water. It makes absolutely no sense!

Last edited by DustyPorViva; 08-31-2007 at 07:54 AM..
Reply With Quote