You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line makes no sense because if "action" answers "true" to "has_max_uses()" but "current_uses" equals "0", "else" is called and accordingly "action" is added to the "possible_actions".
Instead, the code should look like this:
var possible_actions: Array = []
for action in unit.get_actions():
if action.has_max_uses():
if action.current_uses > 0:
possible_actions.append(action)
else:
possible_actions.append(action)
Please correct me if I'm wrong - I'm just reading the code. :-D
The text was updated successfully, but these errors were encountered:
Godot-Barebone-RPG/src/entities/Player.gd
Line 24 in 6258417
This line makes no sense because if "action" answers "true" to "has_max_uses()" but "current_uses" equals "0", "else" is called and accordingly "action" is added to the "possible_actions".
Instead, the code should look like this:
Please correct me if I'm wrong - I'm just reading the code. :-D
The text was updated successfully, but these errors were encountered: