How to make ramdom levels?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Regret666

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?

:bust_in_silhouette: Reply From: mdubaisi

part1: https://www.youtube.com/watch?v=2nk6bJBTtlA
part2: https://www.youtube.com/watch?v=1O83wdW5hAs
is this what you need?

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.

Regret666 | 2020-08-29 05:58

your welcome

mdubaisi | 2020-08-29 06:16

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()

mdubaisi | 2020-08-29 06:26

Thank you…

Regret666 | 2020-08-29 06:32