View Single Post
  #21  
Old 05-10-2007, 02:42 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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;

Why not just set ongrass = 1; in the beginning, then set it to 0 if its not? And you should just put the if(leftmousebutton) on the timeout = 0.05;, I dislike if (event && lol), but I guess that's why GS2 was made.
__________________
Reply With Quote