#Howdy, beginner here.
50 messages · Page 1 of 1 (latest)
But how would I detect the click?
what version of godot?
How might I check?
In godot top menu, help, about
Ok. Let me fire up my project and get a screen shot. Can you send the part of the script you are using to pop the bubble?
Project, Project Settings, Input map
The signal only sends the frame you hover over the bubble, it'd have to be frame perfect timing for the click
My grammar bro
I see you have _on_Area2D_mouse_entered()
If that is connected to the bubble, then you could do something like
_on_Area2D_mouse_entered()
if Input.action_press("bubble_pop"):
queue_free()
It doesn't seem to work as the signal is only called when you hover over the node it isn't repeated however
So it'd have to be frame perfect in order for it to work. Thanks though.
Do you think I could use an if statement in the physics process and check whether the area2d was hovered over there? then it'd repeat the if statement until you actually do it. (Hope this makes sense)
Yes
lol, you are on the right track. Any error message? How big is the collision shape.
I haven't gotten many errors it just doesn't seem to work
Here's the frog lol
I also tried getting the area 2d then checking if the mouse entered it.
got this error
On your mouse enter function, can you successfully print() ?
Is that the bubble scene tree or another? Consider, the bubble should be the one detecting mouse enter, then queue_free itself.
That's another the I just instanced the bubble scene in the main scene with the frog
I'm planning on just cloning the scene a lot.
But I think I have to go to sleep now.
Thank you for all your help, I'm sure I'll figure it out tomorrow!
Me too, drive cement truck all day
Level scene, frog scene, bubble scene
duplicate bubble scenes into level. Yes?
Yes
And the frog'll play an animation when it shoots out the bubble
I don't know how yet, but I'll get there
👍
Perhaps another fellow will answer while we sleep. Happy trails with your project 🙂
You too
hey there @forest nymph ! if you wanted to share your project with me I'd be happy to try to look into this issue for you 👍
You don’t need to check in the physics process - if you go to signals for the area2d and connect mouse entered to a function, you can move your print function to there
The simplest way would be to set a variable to true when receiving the mouse entered signal and set it to false when mouse exited - and then check if the variable is true on click
Thank you very much this works!
Yay, I’m glad!
Now how would I 'archive' this question?