0 votes

I'm currently working on my first roguelike and i want to have a different levels every run
How do i do it?
Extra questions...can i make my levels in one tcsn?

in Engine by (29 points)

1 Answer

0 votes
by (288 points)

Not quite...you see i already have a levels and i just want to randomize them,not generate a level but thanks for the link.

your welcome

i think this code may work:

const level1 = the path
const level2 = the path
const level3 = the path
....

var levels = [level1, level2, level3]

func ready():
randomize()
levels.shuffle()
levels.pop
up()

Thank you...

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.