Skip to main content
fixed typos
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

I am very new to Godot and coding in general, so I apologize in advance for any simple mistakes. I am trying to have my text display the variable "ammodisplay"ammodisplay on my object "MarineMarine." When I launch the game, the text sets to 7 (the correct value) but as I play the game and the variable changes, the text does not update with it. Any insight as to how I can fix this? Thanks in advance!

extends Label var NODE = load("Marine.tscn") var ammo = NODE.instance() var ammod = ammo.ammodisplay func _process(delta): text = (str(ammod)) ``` 

I am very new to Godot and coding in general, so I apologize in advance for any simple mistakes. I am trying to have my text display the variable "ammodisplay" on my object "Marine." When I launch the game, the text sets to 7 (the correct value) but as I play the game and the variable changes, the text does not update with it. Any insight as to how I can fix this? Thanks in advance!

extends Label var NODE = load("Marine.tscn") var ammo = NODE.instance() var ammod = ammo.ammodisplay func _process(delta): text = (str(ammod)) ``` 

I am very new to Godot and coding in general, so I apologize in advance for any simple mistakes. I am trying to have my text display the variable ammodisplay on my object Marine. When I launch the game, the text sets to 7 (the correct value) but as I play the game and the variable changes, the text does not update with it. Any insight as to how I can fix this? Thanks in advance!

extends Label var NODE = load("Marine.tscn") var ammo = NODE.instance() var ammod = ammo.ammodisplay func _process(delta): text = (str(ammod)) 
Source Link
Aaron
  • 21
  • 2

Godot / GDscript label text not updating every frame like intended

I am very new to Godot and coding in general, so I apologize in advance for any simple mistakes. I am trying to have my text display the variable "ammodisplay" on my object "Marine." When I launch the game, the text sets to 7 (the correct value) but as I play the game and the variable changes, the text does not update with it. Any insight as to how I can fix this? Thanks in advance!

extends Label var NODE = load("Marine.tscn") var ammo = NODE.instance() var ammod = ammo.ammodisplay func _process(delta): text = (str(ammod)) ```