Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
clamp() and get-only property syntaxiguessfiveFor:
```gdscript
energy = int(clamp(value, 0.0, max_energy))
```
Would this be the better solution in Godot 4:
```gdscript
energy = clampi(value, 0, max_energy)
```
Also for:
```gdscript
var attack := base_attack
```
Would this syntax be strictly get-only or is it more like a suggestion:
```gdscript
var attack: float:
get:
return base_attack
```10Oct. 11, 2024
Why do we duplicate the stats?definitive-aardvarkWhy do we duplicate the stats resource before reinitialising it? Can we not just reinitialise the stats resource that is given in the inspector?10Sep. 01, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.