Hi! I'm trying to make a short clicking based game where you click on 'sprites' i guess and then they move to a point on the screen (it's heavily text based).
I'm planning to use the animationplay feature to make this happen but my problem has been that the sprites all move no matter where i click on the screen, instead of the specific one i've clicked. I tried to get around this by adding a texturebutton (didn't work, removed it) and now am using the Control feature, but i've run into a problem with the mouse.
Here is my code:
onready var heartorgantest = $OrganTestRemovalForGame/HeartOrganTest
onready var heartmove = $OrganTestRemovalForGame/HeartOrganTest/heartmove
onready var heartcontrol = $OrganTestRemovalForGame/HeartOrganTest/heartcontrol
if mouse_entered("heartcontrol"):
if Input.is_action_just_pressed("right_click"):
heartmove.play("heartanim")
print ("clicked")
My problem has been with the "mouse_entered" line, it says that it is not declared in current class.
I know some of python but am new to gdscript so i'm unsure of what this means or how to fix it, any help would be appreciated thanks