• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Units mana becomes xxxx

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

I want create a trigger, that runs when a units mana becomes xxxx.

This isn't the problem but I want create it like this , if the mana becomes 300,600,900,1200, ....., max 3000

Now I don't want to create always a new trigger with a new event, so I want ask if it is possible to add an event that says "Ever 300 mana of unit" or something like that?
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Use a condition which checks the current amount of mana each time of your triggering unit.
  • (Mana of (Triggering unit)) Equal to 300.00
  • Example
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Mana of (Triggering unit)) Equal to 300.00
    • Actions
      • Game - Display to (All players) the text: SHOUT!
All in one:
  • Example
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of (Triggering unit)) Equal to 300.00
        • Then - Actions
          • Game - Display to (All players) the text: SHOUT!
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Triggering unit)) Equal to 600.00
            • Then - Actions
              • Game - Display to (All players) the text: MOAR!
            • Else - Actions
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

There we got a problem in my eyes:

Amigurumi your trigger wont work - I tested it and I wondering if Xarwins work in this case to. My Hero got high mana and gains every second 20 mana. But this mana regen isn't every 1 second 20 mana its like every 0.05 seconds up to a second = 20 mana.

So I need to use equal to or greater then. But if I use "...greater then..." I need to turn the trigger off. But if I use waits and turn this trigger on after the waits, the 600 or 900 mana action can be skipped.
 
xarwin should separate the ITE's not having the second one on the first ones else ^^ else he got it totally correct

why shouldn't that work? it doesn't matter if it's in the ITE, or outside the first.
maybe it doesn't work, because he copied the triggering unit, and since it's
a periodic timer, which a unit can't trigger, it won't see any unit.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
why shouldn't that work? it doesn't matter if it's in the ITE, or outside the first.
maybe it doesn't work, because he copied the triggering unit, and since it's
a periodic timer, which a unit can't trigger, it won't see any unit.

it works too but if you separate them you dont have to first you check if they have 300 and then if they have 600 and it goes on in the same action, if you separate them, check once, if not, move to next ITE :)
 
Status
Not open for further replies.
Top