• 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] Simple add mana spell

Status
Not open for further replies.
Level 11
Joined
Oct 28, 2012
Messages
231
Hey,

I've been struggling with a very simple UNIT ability.

I want an ability which makes one unit transfer 100 mana to another. Basically it costs caster 100 mana to add 100 mana to another friendly unit.

Can it be done without hero abilities and without some annoying triggers?

Thanks in advance! :)
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Hero abilities are no different than unit abilities, they just have the flag set to true. They are functionally identical except for the ability to level them up.

What about this was hard for you? It’s literally a 3 line trigger that does exactly what you would expect.
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to TRANSFER
  • Actions
    • Unit - Set current mana of (target unit of ability being cast) to ((current mana of (target unit of ability being cast)) + 100) //this line is called “unit - set property”
 
Level 11
Joined
Oct 28, 2012
Messages
231
Thank you very much =)

No it's not too hard and I actually drafted identical script. But I had some issues with finding the right ability to use as this ghost ability. I tried to base it on several abilities but they didn't work if the target got full HP and so and so on. Any ideas?

Idk, abilities in my map are completely messed up. The description is not displayed properly and I get all kinds of silly characters appearing when you put some abilities on autocast and stuff like that. Idk what went sideways but it seems bugged.

WvfUMEy


Imgur
 
Thank you very much =)

No it's not too hard and I actually drafted identical script. But I had some issues with finding the right ability to use as this ghost ability. I tried to base it on several abilities but they didn't work if the target got full HP and so and so on. Any ideas?

Idk, abilities in my map are completely messed up. The description is not displayed properly and I get all kinds of silly characters appearing when you put some abilities on autocast and stuff like that. Idk what went sideways but it seems bugged.

WvfUMEy


Imgur
You're probably messing up the tooltips in some way.

Also try to base the ability off "Channel" and trigger all special effects and functions.
 
Level 8
Joined
May 21, 2019
Messages
435
Hey,

I've been struggling with a very simple UNIT ability.

I want an ability which makes one unit transfer 100 mana to another. Basically it costs caster 100 mana to add 100 mana to another friendly unit.

Can it be done without hero abilities and without some annoying triggers?

Thanks in advance! :)

Aside from very basic trigger spells, this is essentially what the Blood Mage's mana drain spell does, albeit as a channeled spell. If it's possible to disable enemy targets from that spell, you may have a non-trigger based option.

As for the trigger version, you could make it a bit nicer by using a 0 mana cost ability, and then basing the transferred mana on the casters mana. So, if the caster has 63 mana, you give 63 mana to the target, simple as that. You can cap this effect using a variable array which corresponds to the levels of the ability, or, have the ability scale in a linear pattern that makes it possible to simply calculate the maximum using only the ability level.
 
Level 11
Joined
Oct 28, 2012
Messages
231
Hello again!

Thanks to all! I got the ability work with the Acid bomb (with Channel I couldn't find a way to make the ability "targetable". But I have an issue. The spell still applies the graphical debuff (not the spell effect, but the small icon). I cleared the ability completely, so I have no clue why is it still so. Is there a way of removing that without touching the original acid bomb effect which I might actually use on the map aswell?
 
Status
Not open for further replies.
Top