Hello People! I have made a random map generator! It is basic.
This is the code for it
when gf clicked goto x: [-240] y: [180] repeat until << (y position) = [-172]> and < (x position) = [224]>> if < (x position) = [240] > change y by [-16] set x to [-240] else switch costume <pick random [1] to [2]> stamp change x by [16] stop scriptThis is it!
Offline
Great script, but TiMaC is for stuff other than scratch.
Offline
(Oh, the posts were deleted ._.)
That wouldn't work. The script would stop as soon as it starts. Why did you put a "stop script" block in there? ._.
Offline
this would be better, but more complex
when green flag clicked go to x: -240 y: -180 clear set "TempHeight" to "15" set "Biome" to (item (pick random 1 to (length of "Biome List" )) of "Biome List" ) repeat (80) if ((Biome) = "forest") set "TempHeight" to ((TempHeight) + (pick random -1 to 1)) else if ((Biome) = "grassland") set "TempHeight" to ((TempHeight) + (round ((pick random -5 to 5) / 10))) else if ((Biome) = "supermountain") set "TempHeight" to ((TempHeight) + (pick random -5 to 5)) else set "TempHeight" to ((TempHeight) + (pick random -2 to 2)) end end end if ((TempHeight) < "15") set "TempHeight" to "15" switch to costume "stone" repeat ((TempHeight) - 5) stamp change y by (6) switch to costume "dirt" repeat ((TempHeight) - ((TempHeight) - 5)) stamp change y by (6) switch to costume "grass" stamp if ((Biome) = "forest") if (((pick random 1 to 2) = "2") and ((TreeSpacingCount) > "3")) set "TreeSpacingCount" to "0" switch to costume "wood" change y by (6) stamp change y by (6) stamp change y by (6) stamp change y by (6) stamp change y by (-6) switch to costume "leaves" change y by (6) stamp change y by (6) stamp change y by (-12) change x by (6) stamp change y by (6) stamp change x by (-12) stamp change y by (-6) stamp change x by (6) stamp change "TreeSpacingCount" by 1 else set y to (-180) change x by (6) switch to costume "bedrock" go to x: -240 y: -180 repeat (80) stamp change x by (6) end end end
Last edited by hello12345678910 (2012-03-09 19:16:59)
Offline