Hello! Another question today haha!I was wondering how to do this? Like they do in several games like Rogue Legacy, Nuclear Throne...and so on.Does anyone know how to get this done in Construct 2? Or can anyone explain me how to make it work?Thanks in advance and have a nice day!

It all depends on how your map is represented. There are different algorithms which will do different things, some may be what you want, and some won't be. Nearly all algorithms will be based off some sort of noise function, but the implementation will be specific to the levels you want to generate.

In general, there are a lot of articles on procedural generation online. You can use a lot of the concepts you find online with the event system, but you'll have to put it together yourself. There is no simple preset template because there are so many methods to do it, with different purposes in mind.