- Joined
- May 20, 2008
- Messages
- 138
Hello!
I want to trigger a spell that acts in a way identical to rejuvination.
It would be something like this:
[wc3]
Events
A unit starts the effect of an bility
Conditions
Ability being cast equal to RejuvinationTargettingSpell
Actions
custom script: local unit udg_RejuvinationTarget
set RejuvinationTarget = Target unit of ability being cast
For each integer A from 1 to 7, do actions
loop - actions
Unit - set life of RejuvinationTarget to (Life of RejuvinationTarget + 20)
wait 1,00 seconds
custom script: set udg_RejuvinationTarget = null
[/wc3]
This makes my spell MUI, but, unfortunately it is stackable this way (as far as I can see) and I dont want that. If I cast rejuvination on the same target again before an earlier rejuvination has expired, I want the new rejuvination to overwrite the old rejuvination.
However, as far as I can see like the trigger is now, the two rejuvinations will simply stack on top of each other, thus naturally healing a double amount of what a single rejuvination would do, and I absolutely do not want that. However, if rejuvination is cast on a unit that already has rejuvination on it, the duration of the spell still needs to be refreshed.
What do I need to add/change in my trigger to make my rejuvination MUI but non-stackable on the same unit? (Keep in mind that several units might be on the battlefield casting rejuvination at the same time on the same/different targets)
The reason I want to do this is that my map will contain several different healing over time spells that work just like rejuvination, and I can't base them all on the Night Elf Rejuvination, its pretty easy to see that that wont work properly.
I want to trigger a spell that acts in a way identical to rejuvination.
It would be something like this:
[wc3]
Events
A unit starts the effect of an bility
Conditions
Ability being cast equal to RejuvinationTargettingSpell
Actions
custom script: local unit udg_RejuvinationTarget
set RejuvinationTarget = Target unit of ability being cast
For each integer A from 1 to 7, do actions
loop - actions
Unit - set life of RejuvinationTarget to (Life of RejuvinationTarget + 20)
wait 1,00 seconds
custom script: set udg_RejuvinationTarget = null
[/wc3]
This makes my spell MUI, but, unfortunately it is stackable this way (as far as I can see) and I dont want that. If I cast rejuvination on the same target again before an earlier rejuvination has expired, I want the new rejuvination to overwrite the old rejuvination.
However, as far as I can see like the trigger is now, the two rejuvinations will simply stack on top of each other, thus naturally healing a double amount of what a single rejuvination would do, and I absolutely do not want that. However, if rejuvination is cast on a unit that already has rejuvination on it, the duration of the spell still needs to be refreshed.
What do I need to add/change in my trigger to make my rejuvination MUI but non-stackable on the same unit? (Keep in mind that several units might be on the battlefield casting rejuvination at the same time on the same/different targets)
The reason I want to do this is that my map will contain several different healing over time spells that work just like rejuvination, and I can't base them all on the Night Elf Rejuvination, its pretty easy to see that that wont work properly.