• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Mana being tied to kills

Status
Not open for further replies.
Level 3
Joined
Jun 10, 2008
Messages
29
Well i got the trigger for increasing mana every time a unit with a specific ability gains a kill. In short this is meant for a unit that becomes tanky via abilities that only cost 2 or 3 mana, his max is 12, and he can only gain mana via kills, making him tanky against lots of little guys.

But I've hit a snag, because i want the unit's mana regeneration to never get higher or lower based on intel or items, only have a set negative regeneration of one mana every 5 seconds (his regeneration is set to -0.2)

I'm having trouble setting a unit's mana via triggers, and I've also tried an ability that gives mana and the level increases as the hero's level does. Setting his intelligence to 0 as well as setting his regeneration to 0 also having him not gain any intel via levels has worked, but an item that can give mana (available to other heroes) can break him. In short i;m wondering if there's a custom script to essentially reset his max mana and mana regen at short enough intervals, or trigger turning off the effects of the intelligence stat for him.

I've also looked into constantly setting his mana to an integer, so any regeneration or intelligence wouldn't come into effect because his mana is always set to what the integer says it is (his current kills minus abilities and natural decay) but this still leaves the problem of increasing max mana via intel items or other buffs that might be floating around. (So far i think this is the best way just need a max mana trigger)

What I'm thinking is a trigger the essentially resets his max mana every few seconds to whatever the amount needed is. But I've spent all day on this and i have to say that I'm stumped. Any help at all, even a better scripting tool then what's in the vanilla frozen throne editor would be awesome.
 
Level 7
Joined
May 18, 2010
Messages
264
  • What are you talking about
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of YourSpell for (Killing Unit)) Equal to 1
    • Actions
      • Set TheManaOfUnit = (Integer((Mana of (Killing unit))))
      • Unit - Set mana of (Killing unit) to ((Real(TheManaOfUnit)) + 1.00)
Its raw... i didnt get what did u mean i see 18 usles rows of tiping...

Go to object editor and set THE heroes inteligence to 1 and his inteligence gain per lvl to 1 to stop his mana overgoing 12
for mana regen GO to main World editor window (then click Advanced tab) then select gameplay constants
Then in leftup corner check the (Use Custom Gameplay Constans) THEN FIND
Hero Attributes - Mana Regene. Bonus Per Int to 0 that should fix all the problems
 
Status
Not open for further replies.
Top