• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Simple add mana spell

Status
Not open for further replies.
Level 10
Joined
Oct 28, 2012
Messages
228
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 39
Joined
Feb 27, 2007
Messages
5,034
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 10
Joined
Oct 28, 2012
Messages
228
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 10
Joined
Oct 28, 2012
Messages
228
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?
 
Level 39
Joined
Feb 27, 2007
Messages
5,034
...change the buff like you would with any other spell. The best you can do is have it last for the minimum duration of 0.01 so the icon will be visible briefly. Channel has a target type field and doesn’t apply a buff to the target.
 
Status
Not open for further replies.
Top