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

[General] Change Mana Regen in Combat

Status
Not open for further replies.
Level 2
Joined
Jun 27, 2016
Messages
13
Is it possible to increase a heroes mana regen while when they're attacking or being attacked and for it to last a few seconds after they stop? If so, how?

If possible I want to do it with just triggers. If not that's okay too, it's just preference as I'm fairly new and don't have any experience with variables or JASS coding.
 
Last edited:
Level 22
Joined
Aug 27, 2013
Messages
3,973
Make a dummy to cast the modified healing salve - You can customize it and change it from life regen to mana regen and also, you can make it not to dispel on attack - on your hero when they are attacking or attacked.
Or you can make the hero has custom mana regeneration which is probably more complicated than the first one.
 
Level 2
Joined
Jun 27, 2016
Messages
13
Make a dummy to cast the modified healing salve - You can customize it and change it from life regen to mana regen and also, you can make it not to dispel on attack - on your hero when they are attacking or attacked.
Or you can make the hero has custom mana regeneration which is probably more complicated than the first one.
Oh that's really good! Thankyou!
 
Level 2
Joined
Jun 27, 2016
Messages
13
Sorry, but I seem to be stuck making the dummy you mentioned. I have it creating the dummy with the modified item but I don't know how to make him use the item on the hero, make him invisible and how to turn off collision. Do I need to learn variables for this? I see ways I could do it if I did... This was my best attempt at making variables but the only thing that worked was creating the unit, giving him the item and making him invulnerable (I still can't figure out the invisible part)


8955dad4b8.png
 
Last edited:
Level 4
Joined
Sep 13, 2014
Messages
106
Use either a dummy unit that has no model, no shadow, etc, or use the action "Animation - Change Unit Vertex Coloring" with transparency equal to 100%.

Also you will want to add an expiration timer to the dummy unit, to prevent unit leaks (an expiration timer is like the ones that water elementals and such use)
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
As ZerGreenOne said, you can use a dummy unit that has no model. (Art - Model File = Blank)
and give it a locust ability. So It will be invulnerable and has no collision.
You can then either make a temporary dummy - By giving it an expiration timer so it will be auto-
removed once the timer expires as ZerGreenOne said - or a permanent dummy which you can
make at map init and is used anytime whenever it is needed.

I really recommend you to learn variables, they are very useful and helpful in triggering.
Make sure the dummy can cast the ability. (No Cooldown, No Mana Cost, 9999 Range)
If it still doesn't work then we should find a workaround for the order problem.

Edit:
Found the workaround. Use this:
  • Custom script: call IssueTargetOrderById( YourDummy, 852609, AttackedUnit)
YourDummy must be inside a variable. Let's say the variable name is "Dummy".
In the custom script, it must be written as "udg_Dummy".
AttackedUnit must also be inside a variable. Let's say the name is "Target".
In the custom script, it must be written as "udg_Target".
852609 is the order string of Healing Salve.

This is an example:
  • Custom script: call IssueTargetOrderById( udg_Dummy, 852609, udg_Target)
 
Last edited:
Level 2
Joined
Jun 27, 2016
Messages
13
As ZerGreenOne said, you can use a dummy unit that has no model. (Art - Model File = Blank)
and give it a locust ability. So It will be invulnerable and has no collision.
You can then either make a temporary dummy - By giving it an expiration timer so it will be auto-
removed once the timer expires as ZerGreenOne said - or a permanent dummy which you can
make at map init and is used anytime whenever it is needed.

I really recommend you to learn variables, they are very useful and helpful in triggering.
Make sure the dummy can cast the ability. (No Cooldown, No Mana Cost, 9999 Range)
If it still doesn't work then we should find a workaround for the order problem.

I did everything except make the dummy use an ability. I thought he was supposed to use an item, not an ability? I have the item/item ability that does what i need I just don't know how to get him to use it. Thankyou for all of the help so far!

I ended up using the transparency & locust
I thought Hero - Order Dummy to use item carried in slot 1 on triggeredhero would make him use the item but I guess not.

EDIT: For the workaround it says custom script... I'm not sure how to get there or how it works but would it not be the same as
48188c90d7.png
 
Last edited:
Level 5
Joined
Jun 15, 2016
Messages
111
Maybe try adding a Brilliance Aura-based spell into a spellbook then disable it for the unit. After a timer it will remove that spellbook, unless attacked again?
 
Level 2
Joined
Jun 27, 2016
Messages
13
Maybe try adding a Brilliance Aura-based spell into a spellbook then disable it for the unit. After a timer it will remove that spellbook, unless attacked again?
my friend got me to do that, except not inside a spell book. I just gave the hero a brilliance aura and then took it away after a wait timer. I made invisible button models to hide it. Can i ask why the spellbook? I dont understand that
 
Level 5
Joined
Jun 15, 2016
Messages
111
my friend got me to do that, except not inside a spell book. I just gave the hero a brilliance aura and then took it away after a wait timer. I made invisible button models to hide it. Can i ask why the spellbook? I dont understand that
What you did is almost the same, except that you had to add the invis spell buttons. Adding a disabled spellbook is way faster.

Spellbook is an item ability(change it to hero) which contains up to 11 spells. Any passive ability inside the spellbook is added to your hero as well, and a disabled spellbook does not show the icon of the spellbook(but the passives still apply).
 
Status
Not open for further replies.
Top