![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | FelipeRattu |
I want to make a memory game in Godot and i’m trying to do this by following the tutorial series made by Mister Taft Creates on youtube for a match 3 game. I basically made the same code for generating the 2D array and instaciating the scenes with the cards but i want each card to grow in scale a little when i hover the mouse over it.
I’ve made a main card scene from witch all the other cards inherit from and in this scene i’ve made an Area2D node to use the on_mouse_entered() signal, then i attached a GDScript to the card node with the following code :
extends Node2D
export (String) var card_image
func _on_Area2D_mouse_entered():
print(“signal working”)
$ReescaleAnimation.play(“upscale”)
pass
func _on_Area2D_mouse_exited():
print(“signal also working”)
$ReescaleAnimation.play(“deescale”)
pass
it really works fine when i play the card scene but when i play the scene with the grid of cards it does nothing and i have no idea why…
note: not even the print command works in the grid scene.
#PRINTS
- Card scene:
- Grid scene: