• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] I need your help to create my spell: Envenomed Dust

Status
Not open for further replies.
Level 1
Joined
Jun 13, 2008
Messages
132
Hi again, I am working in my map and now I am in a big trouble again. My hero, the Earth Panda, has a skill that creates an earth explosion (a custom model from a hive uploader), and the explosion has the effect that every enemy on it (600 AoE) cannot regenerate health. The explosion lasts six seconds, and you can use the ability 2,3,4,5,6 times before it becomes unusable, the cooldown is about 60 seconds. So, the first time you use the ability it does not go into cooldown, but a separate trigger stores that you have used it one time, and if you use it again it goes into cooldown, in concrete I just store the skill level and remove-add it again if it does not go into cooldown. That part is fairly easy, well, the problem is that I cannot get my complete trigger to work. So, if you have time, and you would like to help, I would accept any idea in how to deal with this trigger. Any help will be appreciated.
By the way, do you think it is overpowered or not?
Thanks again.
 
Level 5
Joined
Jan 27, 2014
Messages
164
It's pretty (or maybe impossible to be perfect) hard to trigger 'no health regeneration' for units.

You have to take into account the
- healing effect taken during the duration of the spell.
- damage taken during the effect.
- other damage detection triggers (if any) that may collide with the effect.

The first 2 points mentioned above are the hardest to detect.
Then again, perhaps someone has already made a system for this somewhere.
As of now, I'd say it's quite impossible to do what you plan to do.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
When the spell is used, pick all affected units in group, save their current hp.
Then every 0,2 second check, if hp of each affected unit is not greater than the amount you saved. If it is, lower the hp to the saved amount.
If the unit has less health than the saved amount, save the current hp as the health amount for periodic check.

e.g.
Code:
Caster uses this spell, the spell affects only one unit.
The current health of the unit is 250 -> the spell saves this amount of "HealthCheck" for that unit.

The loop trigger will check every 0,2 second, if [ Current health > HealthCheck ]
-  if it greater - for example the unit has 300 health, you reduce the current health of unit to HealthCheck amount - thus you reduced it back to 250

- if the current health is actually lower than HealthCheck - for example the unit has only 100 hp now, you save the current health into HealthCheck, replacing the original value (250), so it will check if it doesn't heal above 100 hp.
 
I did not 100% understand if you mean that unit itself wont be able te regen anymore, or if you want it like Nichilus said... that hp cant get higher but only lower.

Me did unerstand that only unit's hp regen should stop, but unit could still get healed by other stuff for example.

Nichilus made an good approach for prevent general hp increases, but maybe u want to do exceptions at healing potions, healing abilities or metamorphosis (which can also change basic hp).

Ofc, you would need to calculate new units coming in range, as also units getting out of range.
 
Level 1
Joined
Jun 13, 2008
Messages
132
The spell creates a dummy unit for 6 seconds that helps me to determine the points where I need to check if there are units affected by the buff, the problem is I don't know how to store the reals and the units toghether, I am not that expert :S
 
Status
Not open for further replies.
Top