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

Removing natural mana regen

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I want to make a hero that gains mana by attacking and receiving damage, he must have a maximum mana of 100 (can't go higher) and can't regenerate mana.

Is that possible? (Since I already have heroes with the normal mana system)
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
if you want to have both types ithink its not possible, but you can chage the mana/mana regen bonuses in gameplay constants, but this would effect all heroes.

if you want it for only one hero you can maybe give him no mana regen and 100 mana by default, and don't let him gain intelligence by levels, so his regen rate and mana don't change
 
Level 12
Joined
Mar 23, 2008
Messages
942
if you want to have both types ithink its not possible, but you can chage the mana/mana regen bonuses in gameplay constants, but this would effect all heroes.

if you want it for only one hero you can maybe give him no mana regen and 100 mana by default, and don't let him gain intelligence by levels, so his regen rate and mana don't change

and flat mana regen by items or aura?
 
Level 3
Joined
Sep 25, 2008
Messages
39
You could make a trigger that runs every 0.25secs which changes the units mana back to what it was last time the trigger was run.
Then trigger the mana gain/loss and also edit the variable.
 
Level 9
Joined
Jan 14, 2008
Messages
366
its not possible the way its intended, but there are several workarounds that make it work.

all take different conditions.

for example 1:
- totally remove the default regeneration in the gameplay constants.
- setup a periodic trigger that picks every hero, [except those who you want to gain mana by attacking and taking damage] and gives him an amount of mana that is calculated by their intelligence.

that would work.

after reading the other posts, im sure its safe to say, my approach is the most effective
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
3 solutions from me
- Easiest one I guess: You make a variable to use as mana and you set units mana to that variable every 0.05 seconds for example, and you change that variable on attack and get attacked or use spell etc
- Make Itelligence not give mana regen in Gameplay Constants (bad thing is it will affect all units so you can add mana regen bonuses to ones you want to have mana regen)
- Make an ability that gives negative mana regen (base it off from an item ability so its invisible) and keep Item Ability true so it stacks and add that ability to unit <intelligence> times so it will negate all mana regen effect (its a little hard but it can be made)
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
no as long as it doesnt create a special effect or some instance on map its no problem it even wont lag if you make timer interval 0.001 so 0.05 is fine
but if you are over paranoid make it 0.1 xD

Edit: *meow*
 
Status
Not open for further replies.
Top