Hi everyone,
So here is my question, I did this but it only fill 1 column and 1 line.
How do I manage to fill my entire tilemap?
Bonus question: is it possible to also randomise the rotation and mirror for tiles?
Thanks!!
Use two nested loops:
For "x" from 0 to 100 For "y" from 0 to 50 Set Tile (loopindex("x"), loopindex("y")) to random(....
Bonus question: is it possible to also randomize the rotation and mirror for tiles?
Yes, you'll have to use a temporary variable, something like this:
Set r to int(random(8)) Compare r=1 : set tile state to "flipped horizontal" Compare r=2 : set tile state to "flipped vertical" Compare r=3 : set tile state to "rotated 90 degrees" .... Compare r=7 : set tile state to "rotated 270, flipped vertical"
Develop games in your browser. Powerful, performant & highly capable.
Whoaaooo!! That's perfect! Thanks a lot dop2000!!!