Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Get() doesn't seems to find object created by addLevel() #857

Answered by lajbel
martiansparlor asked this question in Q&A
Discussion options

You must be logged in to vote

In Kaboom 3000, you can utilize get("*", { recursive: true }) to access to the scene root's game objects along with its child objs. This is due to the parent/child system where a level serves as the parent and the various tiles represent the children.

You can also use obj.get() to retrieve children within a parent object. EX:

const level = addLevel(...);

level.get("*"); // Get all children of level

It's wonderful to hear that you're teaching children! Feel free to ask any questions here.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@martiansparlor
Comment options

Answer selected by martiansparlor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants