HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A beginner requires your help with a trigger

01-20-2010, 03:47 PM#1
Fyuran
Hello there,

I'm really sorry if i didn't introduce myself first, but here i am :)

I have a problem, right now i'm trying to make a hero whose attack is supposed to dran HIS mana(I'm also trying to make him do more damage based on a % of his mana, the lower it is, the more damage he does)

But.. I really don't know where to start, is anyone so kind to help me? WC3 editor and Jass really caught my attention so I'm starting to learn (the basics at least).

I'm just a beginner so you can laugh/flame/suggest anything you like, i'll take that as a teaching for me ;)
01-20-2010, 07:39 PM#2
Anitarf
If you just want attacks to drain mana, that is easy enough to do with a single trigger that runs whenever a unit attacks and reduces the mana of the unit if the unit is of the type that looses mana with attacks. If you also want the unit to not be able to attack when it runs out of mana, that is a bit more tricky to do.

For the bonus damage, I'd use something like Damage Modifiers.
01-20-2010, 07:48 PM#3
Saishy
If you are a beginner I would suggest: Intuitive Damage Detection System

Will help you a lot with that.
01-20-2010, 09:59 PM#4
Michael Peppers
About losing mana, Anitarf said it all...

But for the damage bonus, instead of Damage Detection, you could try also another way:

Attack Bonus +? (In the item abilities) put into a Disabled Spellbook with a certain number of levels, and giving/removing/leveling up this Spellbook according to the remaining percentage of mana.

The only drawback of this method is that the bonus will be seen near the attack value of the unit (just as if he had a "+ Attack" item).

Said this, a Damage Detection library (like the ones Anitarf and Saishy are linking to) is the best (and cleanest) way to do that, but that *might* require some good knowledge of what you're doing. Just my 2 cents