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

Status
Not open for further replies.
Level 6
Joined
Dec 8, 2009
Messages
179
I want to create a hero that has got a mana regeneration of 0 Points per Second.

But....

- this Hero should gain int per Level
- should have no mana regeneration near any Fountain
- should have no mana regeneration through Potions, Auras, Wards, Items like Sobi-Mask or any other mana source
- other Heroes should regenerate their mana the normal way
 
Level 6
Joined
Dec 8, 2009
Messages
179
that doesn't solve my problem 'cause

-I don't want a hero that has a infinite mana DE-generation
-If I wanted a hero with 0 Mana i would just set the maximum mana of it to 0 via Trigger

I think I've not made my point clear at my first post so sorry if I sound harsh
 
Level 6
Joined
Dec 8, 2009
Messages
179
that could be the Solution^^

I just set the targets of potions fountains auras wards ect. that they don't affect that hero.
And than via Trigger adding a mana Degeneration Skill reffering to amount of the int of that hero with a degeneration exactly fitting "managain per int * int"

@ Pharaoh_ OK sorry then I got it wrong but I still don't understand what you mean:

If i add a infinite negative Mana amount to the hero he can get any mana right??
but I want him to get Mana upon using his skills (forgot to say in first post too sorry)
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
It's going to be really hard to it the negative mana reg exactly to the normal one :/

I highly suggest triggering the abilities and use triggers.

e.g.


ability 1 gives 50 mana.

You use an integer to store that mana and every 0.5 sec you set the mana to the stored integer value.

If he casts another spell you just modify the integer as you please.
 
So you actually want to create a Barbarian from Diablo. Yes, you should be more specific, because total mana removal is different than mana regenerated only by skills. So, remove the base mana regeneration and you can add to the hero the classification of 'Ancient'. Then, from every source a unit can gain mana, simply add to Targets Allowed "Non-Ancient" and you'll get what you want.
Then, triggers:
  • Trigger
  • Events
    • Time - Every 1.00 seconds of game-time
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units of type (your hero-type)) and do (Actions)
      • Loop - Actions
        • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real(Intelligence of (Picked unit) (include bonuses))*0.05)
This 0.05 is the mana regeneration each point of Intelligence provides. Using this trigger will actually remove the regeneration coming from the Attribute.
 
Level 6
Joined
Dec 8, 2009
Messages
179
hm I also thought about that but I think I'll do it the way I've written

It's not hard to match exactly the normal mana reg I just have to go to the advanced Editor thingy look how much manaregeneration a hero gets per int point and then go to the OE and edit A skill whit X Levels (Where X is the maximum amount of Int the hero can get including items) and just do then as I've written before

EDIT: Wow thanks didn't expect that it's that easy
 
Level 6
Joined
Dec 8, 2009
Messages
179
hm.... you're right.... but....

Can't I just set the targets of the Fountains Auras and Items that they don't affect the hero

Like Pharao_ suggested making the Hero Ancient and then tick at the Targets "Non-Ancient"
 
Status
Not open for further replies.
Top