#Howdy, beginner here.

50 messages · Page 1 of 1 (latest)

fervent rover
#

I am still new at this. But my mind says, you need a signal that mouse enter body, and then pop it.

forest nymph
#

But how would I detect the click?

fervent rover
#

what version of godot?

forest nymph
#

How might I check?

fervent rover
#

In godot top menu, help, about

forest nymph
#

Thanks

#

v3.5.1

fervent rover
#

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?

forest nymph
#

This is what I have currently:

#

As you can tell, I'm struggling lmao

fervent rover
#

Project, Project Settings, Input map

forest nymph
#

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

fervent rover
#

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()
forest nymph
#

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)

fervent rover
#

Yes

forest nymph
#

Didn't work

#

I think I might sleep on it. It's 11 pm for me lol

fervent rover
#

lol, you are on the right track. Any error message? How big is the collision shape.

forest nymph
#

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

fervent rover
#

On your mouse enter function, can you successfully print() ?

forest nymph
#

Yes

#

Alright

fervent rover
#

Is that the bubble scene tree or another? Consider, the bubble should be the one detecting mouse enter, then queue_free itself.

forest nymph
#

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!

fervent rover
#

Me too, drive cement truck all day

forest nymph
#

Ah

#

Good luck with it

fervent rover
#

Level scene, frog scene, bubble scene
duplicate bubble scenes into level. Yes?

forest nymph
#

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

fervent rover
#

👍
Perhaps another fellow will answer while we sleep. Happy trails with your project 🙂

forest nymph
#

You too

charred swallow
#

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 👍

soft frost
#

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

forest nymph
soft frost
forest nymph
#

Now how would I 'archive' this question?