Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Richard_A_Odell |
my Level has a script file
const QBOX = preload(“res://Scene/QB.tscn”)
const QBOX1 = preload(“res://Scene/QB1.tscn”)
const QBOX2 = preload(“res://Scene/QB2.tscn”)
func _ready():
if Global.qb:
var q = QBOX.instance()
add_child(q)
q.position.x = 640
q.position.y = -136
On"QB I have a signal called “random_coins()”
on my level scene i have a node call HUD which has a script with the function
func _on_random_coins() → void:
randomize()
var rv = randi()%50+1
Global.coins = Global.coins + rv
_ready()
so i need help
in my level code i need to connect QB to the HUD function above