• 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.

Need a lil help..

Status
Not open for further replies.
Level 1
Joined
Mar 19, 2006
Messages
2
Does anyone have an idea of how to make this kind of spell/ability:

Whenever a specific unit is attack he will gain x mana.

or the other way

Whenever a specific unit attacks he will gain x mana.

Any help would be greatly appreciated.
Don't know how to use JASS yet though, but if that's what it takes, then I'll learn.

Thanks
 
Level 7
Joined
Mar 6, 2006
Messages
282
You don't need JASS to do that because it is fairly simple. The World Editor is not available to me right now but I'll try my best.

(Gains mana when attacked)

Event:
-(Specific Unit) is attacked
Condition:
None
Action:
-Set mana for (specific unit) to (specific unit's mana) + (the amount you want gained)



(Gains mana when he attacks)

Event:
-A unit is attacked
Condition:
-(Attacking unit) equal to (specific unit)
Action:
-Set mana for (attacking unit) to (attacking unit's mana) + (the amount you want gained)


I will look in the World Editor later and if that is incorrect I will post again right away.
 
Level 7
Joined
Mar 6, 2006
Messages
282
I forgot about the ability part, lol.

Make a custom ability based off of the Devotion Aura ability. Set the armor bonus to zero and the name and tooltip for whatever you want and the buff of the aura (the blue cross that points outward of the Hero) to whatever you want for the "Mana Gain" ability. Or you could make it nothing, it's your ability.

Give that to the Hero and pretend it's called "Mana Gain". Add those triggers in the trigger editor that I put in my last post. And there you go. If you want "Mana Gain" to have multiple levels then post again.
 
Level 1
Joined
Mar 19, 2006
Messages
2
Yeah I just figured out how to make the Unit - Set mana of (triggering unit) to ((Mana of (Triggering Unit)) + whatever)) action. Funny thing though, I had to figure out how it worked through JASS before I saw how simple it actually was.

Thanks alot though.
 
Status
Not open for further replies.
Top