Spent 3 days trying to get this right, hoping someone can help.
I have a 'Being' class. It is the NPC's.
I have a 'BeingHub' which is the canvas layer that is the hud and various menus.
I have a 'mainPlay' class - it is all the nodes together to form the game.
I am trying to implement: When you click on NPC (Being), a little window (BeingHud) pops up. And then when you click on a button on BeingHud, the little window hides. I have the hide working with no issue via a signal between BeingHud and mainPlay.
What I cannot get working ... is when you click on a Being, I need the little window to open. I am for sure - able to get the being selected. I've done this code in the Being script.
func inputevent(viewport, event, shapeidx):
if event is InputEventMouseButton:
if event.buttonindex == BUTTONLEFT:
print("clicked on " + firstname)
Ive realized, the mainPlay node is not picking up the signal.
Is there a better way to implement such a simple thing?