Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | potatobanana |
tower scene
var sell_done_cell =1
func _ready() -> void:
emit_signal("sell",sell_done_cell)
world scene
my current cell id=4
func _on_tower1_pressed() -> void:
var tower_instance = tower_1.instance()
tower_instance.global_position = map_to_world(last_cell) + cell_size/2
tower_instance.connect("sell",self,"_on_sell_done")
func _on_sell_done(sell):
set_cellv(last_cell,sell)
print(sell)
last_cell last click position vector2 , sell = 1
but did’t change