![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | stevenkucera |
I am having trouble calling a function from one Node into another. This is the code to call a player clock in a chess game:
print("pausing")
var clock = get_tree().get_root().get_node("Chess/PlayerClock")
clock.get_script().pause_clock()
print("paused")
This is the code in the clock Node
extends Label
func pause_clock():
print("CLOCK PAUSED!")
The output is simply:
pausing
paused
I also tried
clock.get_scipt().call("pause_clock")
With the same result. Does anyone know why the function is not called?
Steve