Hey, i'm using damage unit action for all damage in my map, obviously if caster dies my persistant effects (basicaly periodic triggers cuz i'm not using data at all) couldn't find a caster unit. This is something pretty much acceptable for my map, but i want to ask if there are some no-brainer solutions for fixing this which won't require redoing all damage system?
If I'm understanding what you're saying correctly, it's that the damager unit for that action is null when you need it to be something? Do a conditional.
If (Caster is alive) then
> deal damage to Target from Caster
else
> deal damage to Target from Target
You can make it damage itself. But if your game depends on proper kill credit it won't give the caster credit for the kill. I typically use a custom value for kill credit to get around this.
Damage unit has bonus property which i'm using for damage value. I'm using diablo-like system where skill damage equal to % of unit's current weapon damage and this damage may vary depending on unit's buffs. So i need to store amount of last damage instance somehow? seems overwhelming... Or i can fake unit death, by making trigger-based actor death animation and changing Hero unit position. This is for heroes only. Sounds much easier for me. So that was my suggestions what do you think about this?
With your approach i still need to store amount of the last damage instance somehow, and for example if this unit is hypothetically under 20-30 DOT-effects i need custom value for each of them for this, also heroes of other players must take exp from killing.
Hey, i'm using damage unit action for all damage in my map, obviously if caster dies my persistant effects (basicaly periodic triggers cuz i'm not using data at all) couldn't find a caster unit. This is something pretty much acceptable for my map, but i want to ask if there are some no-brainer solutions for fixing this which won't require redoing all damage system?
@abvdzh: Go
You could pick all units and use a damage effect instead. You can have those originate from units and players.
it's hard to follow you but i try it anyway. use a if then else
If I'm understanding what you're saying correctly, it's that the damager unit for that action is null when you need it to be something? Do a conditional.
If (Caster is alive) then
> deal damage to Target from Caster
else
> deal damage to Target from Target
You can make it damage itself. But if your game depends on proper kill credit it won't give the caster credit for the kill. I typically use a custom value for kill credit to get around this.
Damage unit has bonus property which i'm using for damage value. I'm using diablo-like system where skill damage equal to % of unit's current weapon damage and this damage may vary depending on unit's buffs. So i need to store amount of last damage instance somehow? seems overwhelming... Or i can fake unit death, by making trigger-based actor death animation and changing Hero unit position. This is for heroes only. Sounds much easier for me. So that was my suggestions what do you think about this?
@LosTacos: Go
With your approach i still need to store amount of the last damage instance somehow, and for example if this unit is hypothetically under 20-30 DOT-effects i need custom value for each of them for this, also heroes of other players must take exp from killing.