0 votes

Hi everyone !
I'm developing a micro-party-game like Warioware, and I'm coding some micro games.

In my game conception, I prefered to separate my work in two scenes : one for the "lives counter" scene, and another one for the chosen microgame. These scenes will be running simultaneously (like the example video in the link below). Both has a script.

Warioware Gameplay here !

For my "Lives Counter Scene", I chose a CanvasLayer type. However, I would like to add a button which could be clicked for the minigame.

I'm adding my microgames elements dynamically in my second Scene, that's why I have to connect a TextureButton to click on it.

When I'm only lauching the microgame scene, it works. But when I'm instanciating it in the main one Scene, the click event doesn't seem to work (the button sprite doesn't even change when it's pressed).


Here is a screenshot :


...
Does anyone has an idea for managing the click event, please ?
Thanks for the answer.

in Engine by (18 points)
recategorized by

It looks like you need to facilitate something which connects the two. You may have to use either a singleton, or use basi various signals to connect the scenes.

1 Answer

+1 vote

Thanks for the reply, Ertain !

Hum, actually... Connection between the main scene and the child one was already made and it worked... There was ONLY ONE blocking element in my parent, and the problem was hum... Really frustrating, as you could see in the picture ^^'

Mouse filter, able to break your mind !

I'm just so dumb...

Thanks anyway !

by (18 points)
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.