class brain OCELOT_ATTACK didn't end attacka after defeat enemy
vajuvung opened this issue ยท 2 comments
So if i use ocelot attack and X entity with ocelot attack defeat Y entity then X entity will still try to kill Y entity that didn't exist and will stuck in one place and cast spell until X entity didn't die. Any solution?
code:
mag_minion:
icon: gold_nugget{CustomModelData:10}
icon_disabled: barrier
quick_cast: true
requires: LibsDisguises
hidden: true
locked: true
mode: hidden
ownable: true
actions:
cast:
- class: SpawnEntity
owned: true
entity_attributes:
generic_attack_damage: "attack_damage * 1"
brain:
goals:
- type: trigger
trigger: attack
priority: 1
goals:
- OCELOT_ATTACK
- type: follow_owner
priority: 2
- type: random_stroll
distance: 12
priority: 3
targets:
- MAGIC_OWNER_HURT_TARGET
- MAGIC_OWNER_HURT_BY_TARGET
triggers:
attack:
cast:
Podstawowy_atak: 20
parameters:
target: self
health: "health_max * 5"
radius: 2
helmet: iron_helmet
cancel_on_damage: 0.5
type: skeleton
name: Mag
item: bow
disguise_target: self
```