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.
Damage Parametersheartfelt-wormFantastic work as always!
If we wanted the mobs to react differently to different damage types/amounts (maybe even depending on the damager node itself!) would that be best simply by accessing the Mob’s hurtbox in the stagger state code to do something like if mob.hurtbox.damage_type, mob.hurtbox.damage_amount and mob.hurtbox.damager to make a variety of hit reactions and such? 20May. 25, 2025
exported Max health stays the same when is changed in the editorsamyIf I am not missing something...
Suggested solution:
in mob_3d.gd script:
```javascript
@export_category("Base Stats")
@export var max_health := 3
var health # change here
```
and in mob_bee.gd in func _ready() -> void:
```javascript
state_machine.activate(idle)
state_machine.is_debugging = true
health = max_health # change here
hurt_box.took_hit.connect(func (hit_box: HitBox3D) -> void:
health -= hit_box.damage
if health <= 0:
state_machine.trigger_event(AI.Events.HEALTH_DEPLETED)
else:
state_machine.trigger_event(AI.Events.TOOK_DAMAGE)
)
```
20Dec. 04, 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.