[DiscordArchive] okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Uni
[DiscordArchive] okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Uni
Archived author: KJack • Posted: 2023-09-27T04:19:17.525000+00:00
Original source
okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Unit hooks related to damage (and later healing). All of these seem relevant:
- OnDamage
- DealDamage
- ModifyPeriodicDamageAurasTick / ModifySpellDamageTaken / ModifyMeleeDamage
`DealDamage` I can't for the life of me get to trigger. I fight creatures, creatures fight each other, I duel another (test) player, and it still doesn't trigger.
`OnDamage` triggers as you'd expect, every time damage is dealt. It doesn't have any information about *what* caused the damage, only that it happened.
`Modify*` applies to just that one type of damage, but only the ModifySpellDamageTaken hook has spell information about what caused it.
Questions:
- what does `DealDamage` do?
- when should I use `OnDamage` vs `Modify*`?
Archived author: KJack • Posted: 2023-09-27T04:20:05.353000+00:00
Original source
~~None of these seem to trigger from environmental damage, by the way - lava and falling both do not generate events.~~
I was wrong, `OnDamage()` catches them.
Archived author: KJack • Posted: 2023-09-27T07:10:38.578000+00:00
Original source
you nailed it - if i disable transports it doesn't happen anymore.
Archived author: Anchy • Posted: 2023-09-27T07:12:06.501000+00:00
Original source
lmao
Archived author: Anchy • Posted: 2023-09-27T07:12:08.519000+00:00
Original source
nice
Archived author: Trojan • Posted: 2023-09-27T07:43:35.942000+00:00
Original source
can we change allowable races in quest template from smallint to int? its a mess with custom races
Archived author: Honey • Posted: 2023-09-27T07:44:44.985000+00:00
Original source
How many custom races do you have?
Archived author: Trojan • Posted: 2023-09-27T07:45:05.350000+00:00
Original source
4
Archived author: Anchy • Posted: 2023-09-27T07:45:08.074000+00:00
Original source
32768
Archived author: Trojan • Posted: 2023-09-27T07:45:22.830000+00:00
Original source
but racemask is always double