• 🏆 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!

Need help with an Spell (triggering)

Status
Not open for further replies.
Level 2
Joined
May 20, 2008
Messages
4
Hi everybody i hope i can recive help by using your site. I have a small problem with making a spell, it would probebly look like this:

Shadow Walk:
The Hero focus all his mind and body and becomes invisible as long as the hero mana is not below some % depending about the abillity level.

I hope i can recive help or not, i have been thinking about this spell a long time and i can't make it work...

Forgive my bad spelling
 
Well, base it on some spell that gives buff (i would go with taunt, and then make a dummy cast invisibility on the caster so caster gains the buff)

then you simply run a trigger that checks every second if unit have that buff, if so set mana to mana - <some amount> then run another if/then/else that checks if the mana is to low make trigger remove buff.

I hope you get the idea ;)
 
Level 2
Joined
May 20, 2008
Messages
4
Well, base it on some spell that gives buff (i would go with taunt, and then make a dummy cast invisibility on the caster so caster gains the buff)

then you simply run a trigger that checks every second if unit have that buff, if so set mana to mana - <some amount> then run another if/then/else that checks if the mana is to low make trigger remove buff.

I hope you get the idea ;)

could you send me an example of how you would do it? That would have been mutch easier xD?
 
Level 13
Joined
Jun 22, 2004
Messages
783
I created a little example for you in this map attached in my post.

CastingUnit = Detects the Casting unit
ManaPool = saves the current amount of mana of the hero, so it can be drained
WindWalk_Level = Saves the hero's current level of the ability so you can set different drain amounts, and additionally is used to reinstall the hero's ability when it looses his/her mana or attacks.
ManaDrain[] = Sets the amount of drained mana per second, the [ ] indicate the level.
WindWalk_on = Boolean Variable to detect if the unit disables the ability.

You can modify this ability to your own hearts content, keep in mind, when adding more levels you want to add the level's mana drain.
This Ability is not MUI so can only be attached to one hero, if you want to enable MUI I suggest learning Jass.

This text is also written in the trigger "Custom WindWalk".

Enjoy.
 

Attachments

  • Custom WindWalk.w3x
    18.4 KB · Views: 41
Level 2
Joined
May 20, 2008
Messages
4
I created a little example for you in this map attached in my post.

CastingUnit = Detects the Casting unit
ManaPool = saves the current amount of mana of the hero, so it can be drained
WindWalk_Level = Saves the hero's current level of the ability so you can set different drain amounts, and additionally is used to reinstall the hero's ability when it looses his/her mana or attacks.
ManaDrain[] = Sets the amount of drained mana per second, the [ ] indicate the level.
WindWalk_on = Boolean Variable to detect if the unit disables the ability.

You can modify this ability to your own hearts content, keep in mind, when adding more levels you want to add the level's mana drain.
This Ability is not MUI so can only be attached to one hero, if you want to enable MUI I suggest learning Jass.

This text is also written in the trigger "Custom WindWalk".

Enjoy.

Thank you very mutch for the help! I will post again if i have further problems :grin:
 
Status
Not open for further replies.
Top