Hello! I've been building some abilities on my mod via triggers and I got stuck - I have one trigger that doesn't work.
The ability is a passive that gives Hero 10/20/30/40% bonus life regeneration for 3 seconds if a unit near him (8 radius) dies.
So the bugs (I think) are:
- I think I didn't specify the owner of Hero nor triggering units (if that's important)
- I did not specify that regeneration bonus lasts for 3 seconds (don't know where).
Conditions are set only to check if the Hero upgraded this ability (which adds behavior), and which ability level is it. I also have another global trigger, which executes this (and other) trigger periodically, each 1 second. I couldn't find any easier way to make the passive abilities, only with periodical trigger.
You can't use variables in events. They just use the initial value and never update the info.
-> use generic events and filter it with conditions.
I would use a program flow like this:
unit dies
C: regrowth behavior check; unit is close to that hero (distance between points: positions of units)
A: Add a behavior (buff) to the hero that raises the regeneration bonus with a duration of 3 seconds.
Also, I would save the hero in a variable and not as a static reference in case heroes could die&respawn or be changeable.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello! I've been building some abilities on my mod via triggers and I got stuck - I have one trigger that doesn't work. The ability is a passive that gives Hero 10/20/30/40% bonus life regeneration for 3 seconds if a unit near him (8 radius) dies.
So the bugs (I think) are:
- I think I didn't specify the owner of Hero nor triggering units (if that's important)
- I did not specify that regeneration bonus lasts for 3 seconds (don't know where).
It gives me error that I cannot understand:
The trigger looks like this:
Conditions are set only to check if the Hero upgraded this ability (which adds behavior), and which ability level is it. I also have another global trigger, which executes this (and other) trigger periodically, each 1 second. I couldn't find any easier way to make the passive abilities, only with periodical trigger.
Any ideas?
You can't use variables in events. They just use the initial value and never update the info. -> use generic events and filter it with conditions.
I would use a program flow like this: unit dies C: regrowth behavior check; unit is close to that hero (distance between points: positions of units) A: Add a behavior (buff) to the hero that raises the regeneration bonus with a duration of 3 seconds.
Also, I would save the hero in a variable and not as a static reference in case heroes could die&respawn or be changeable.