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

[General] Begin mana drain when shape-shifted....?

Status
Not open for further replies.
Level 2
Joined
Nov 20, 2019
Messages
24
Hey all. Never posted here so soz if it's in wrong place...

I have a hero unit that is able to shape shift into a bear using the tinker ability (which all works fine).

Basically, when in this 'bear' form I would like it to consume mana the entire time (lets say 3% a second for arguments sake)

Then when mana has run out to be forced out of this form.

Any way to achieve this?

I did try looking around for a solution but gave up.

Thanks in advance! :)
 
Level 2
Joined
Nov 20, 2019
Messages
24
In addition to this... Any way to use stats as a modifier for a damaging ability?

Say I use starfall with a base damage of 500 per hit, but I also have 500 agility. I would like this to do 1000 damage.
 
Level 28
Joined
Feb 18, 2014
Messages
3,578
Give the morphed unit a negative mana renegeration rate similar to the Destroyer (undead) unit then do this to disable the bear form after his mana runs out.
  • Disable Bear Form
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Morphed Unit
              • (Mana of (Picked unit)) Equal to 0.00
            • Then - Actions
              • Unit - Order (Picked unit) to Neutral Tinker - Disable Robo-goblin
            • Else - Actions
 
Level 2
Joined
Nov 20, 2019
Messages
24
Give the morphed unit a negative mana renegeration rate similar to the Destroyer (undead) unit then do this to disable the bear form after his mana runs out.
  • Disable Bear Form
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Morphed Unit
              • (Mana of (Picked unit)) Equal to 0.00
            • Then - Actions
              • Unit - Order (Picked unit) to Neutral Tinker - Disable Robo-goblin
            • Else - Actions
Thanks worked a treat! Will rep.
 
Status
Not open for further replies.
Top