Promoting an ordinary unit into a hero in a HoMM-inspired game

10 months ago
1

My drag-and-drop implementation was adapted from this video:
https://www.youtube.com/watch?v=dCjMVoQ4l38

The only part that didn't work for me were the @onready variables:
@onready var texture_rect = $TextureRect
@onready var property: Dictionary...

The texture_rect variable turned out to be unnecessary, so I simply omitted it.

I kept the dictionary property minus the @onready annotation, and initialised it in the same script that populated the Godot nodes with data from the C# game state engine.

Commit: swap units and heroes between garrison and visiting army (2023-12-28 21:58:56)

Loading comments...