Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doFloorThing(%x,%y)
- {
- if (%x > 15)
- {
- %y++;
- %x = 0;
- shiftBrickTowards(1);
- shiftBrickTowards(0);
- }
- if (%y > 15)
- {
- return;
- }
- if (%y % 2 == 0)
- {
- shiftBrickRight(1);
- shiftBrickRight(0);
- }
- else
- {
- shiftBrickLeft(1);
- shiftBrickLeft(0);
- }
- if ((getRandom(0,15) <= %y)) //Raise the 15 to make spawning less likely.
- {
- plantBrick(1);
- plantBrick(0);
- }
- schedule(50,0,"doFloorThing",%x+1,%y);
- }
- function doFloorThingFast() //Faster, but may lag server
- {
- for (%y=0;%y<16;%y++)
- {
- for (%x=0;%x<16;%x++)
- {
- if (%y % 2 == 0)
- {
- shiftBrickRight(1);
- shiftBrickRight(0);
- }
- else
- {
- shiftBrickLeft(1);
- shiftBrickLeft(0);
- }
- if (getRandom(0,%y) == 0)
- plantBrick();
- }
- shiftBrickTowards(1);
- shiftBrickTowards(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement