Noob Needs Help Array in Inspector Doesn't Render In-Game

Godot Version

4.5.1

Question

Ask your question here! Try to give as many details as possible.

If you share code, please wrap it inside three backticks or replace the code in the next block:

func _ready() -> void:
    print("hello world")

I’ve been following a Zeneva Tutorial for 2D RPG and I hit this problem. I even started from scratch to make sure I didn’t miss one line and same thing is happening.

I’m using Combat Action Buttons on the Inspector as part of a VBox for commands to the sprites. There aren’t any Errors on that side and everything looks great. But when I start the game all I get are the preloaded texts on the Buttons. I’ve worked every angle and did some debugging codes and it says the UI is talking to the panel. You can see in the pic on bottom left.

func _ready():
next_turn()
print("Current turn: ", “Player” if current_character.is_player else “AI”)
print("UI visible: ", player_ui.visible)```

Slash/Pass are the preloaded text. No script on Pass yet.
Here is the UI Code under my CombatActionsUI and how my Nodes are setup

and the main node the UI is speaking to (game_manager)

Heres a snap of the Insp where the array is talking to and everything looks good.

I’ve messed with every Z index and layout option because it seems to me like the code is working and maybe its hidden. But I’m out of ideas and don’t know where to go from here. Any ideas at all would be a great help.

The Tutorial was Zeneva Micro Turned Based RPG. Thanks again

AI found the correction:

func set_combat_actions (actions: Array [CombatAction]):
	# Ensure all buttons are processed correctly
	for i in len(ca_buttons):
		if i >= len(actions):
			# If there are fewer actions than buttons, hide the extra buttons
			ca_buttons[i].visible = false
		else:
			# If there is a corresponding action, make the button visible and set its action
			ca_buttons[i].visible = true
			ca_buttons[i].set_combat_action(actions[i])
# The logic now correctly assigns actions or hides buttons based on the index.