+1 vote

Aside from detecting in area2D, can i use groups to spawn a scene?

in Engine by (29 points)

1 Answer

+1 vote

This is actually an interesting question, and now I'm intrigued on what kind of project are you working that requires groups to spawn a scene.

But first, to answer your questions: groups are a way to tag nodes, so you can easily find and reference them through code. And yes, you can use groups to spawn a scene.

What is it that you are trying to do? and what are you currently doing?

by (75 points)

Well i want to spawn a random scene outside the camera2d so that my level was random every time, i once saw a game that repeatedly change the scene once it exited a scene to make it look endless link below to understand what i'm saying
I have an idea that i just have a area2d that have a signal body_exited outside the camera
That when the group called tiles exit the area2d it will spawn the next scene
I'm currently doing a roguelike platformer 2d sidescroll so the camera was fixed and only move left and right

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 Frequently asked questions and 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 [email protected] with your username.