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

[Solved] Help with Mana Shield [Closed]

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2017
Messages
12
Hello, thank you for reading this as the title said, is there a way in trigger for a certain amount of mana wil cause mana shield to activate?





Thanks in advanced :)
 
Level 11
Joined
Jan 2, 2016
Messages
472
There is an event `The value of real becomes equal to X` something like that. Now you would have to set a variable ( real type ) that would hold the mana points of the unit you want mana shield to activate.Then you use Unit - A unit Is issued an order with no target (where unit is your unit, and you change no target to Activate - Mana Shield prolly Naga Siren).
 
Level 2
Joined
Apr 18, 2017
Messages
12
So it goes something like this
  • Shield
    • Events
      • Game - ManaLeft becomes Equal to 10.00
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Emuri
    • Actions
      • Set ManaLeft = (Percentage mana of (Triggering unit))
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Activate Mana Shield
 
Level 11
Joined
Jan 2, 2016
Messages
472
For your unit `Emuri`: ( eg. )
  • Set Emuri = Unit - Last Created Unit
It also depends on how you get your unit `Emuri`.
Then goes this:
  • Set ManaLeft = (Percentage mana of (Emuri))
So i'll give you an example of both triggers:
  • TriggerOne
    • Events
      • Unit - A unit sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to YourUnitType
    • Actions
      • Set Emuri = Unit - Sold Unit
      • Set ManaLeft = (Percentage mana of (Emuri))
  • Shield
    • Events
      • Game - ManaLeft becomes Equal to 10.00 // this is okay
    • Conditions
    • Actions
      • Unit - Order (Emuri) to Neutral Naga Sea Witch - Activate Mana Shield
NOTE: This is only if you get `Emuri` unit by buying it,otherwise you should change the `TriggerOne`.Also this won't work for multiple `Emuri` units.
 
Status
Not open for further replies.
Top