View Single Post
  #19  
Old 05-10-2007, 02:22 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
Ya, this would be a simpler way to look at making a bush generator:
PHP Code:
// NPC made by Dusty
if (mousedowntimeout=0.05;
if (
timeout && leftmousebutton) {
  
grasstiles={0x0,0x1,0x10,0x1ff,0x3ff,0x7ff,0x835,0x836,0x837};
  
bushtiles={0x2,0x3,0x12,0x13};
  
ongrass=0;
  for (
i=0;i<4;i++) {
    if (
tiles[mousex-1+i%2,mousey-1+int(i/2)] in grasstilesongrass++;
  }
  if (
ongrass==4) {
    for (
i=0;i<4;i++) tiles[mousex-1+i%2,mousey-1+int(i/2)]=bushtiles[i];
  }
  
updateboard mousex-1,mousey-1,2,2;
  
timeout=0.05;

Doing ongrass++ is retarded. Just end the loop completely if it isn't grass.
__________________
- Zidane / Zidaya
Reply With Quote