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

[Trigger] Fuel system help

Status
Not open for further replies.
Level 6
Joined
Jul 13, 2006
Messages
140
I need some help with making a fuel system for one of my projects codenamed Erober Fiesta (no the name is just a random name and has nothing to do with the map).

I am using mana as fuel and units have a negative mana regeneration.
I want the units to be frozen if they get to 0 mana but there doesn't seem to be any trigger for that (i do not use custom scripts or JASS and i dont know how to either).
Oh and i forgot to mention that they should (ofcourse) be able to move when they get more than 0 mana.
 
Last edited:
Level 3
Joined
Jul 24, 2007
Messages
40
  • Events
    • Time - Every 2 seconds of game time
  • Conditions
  • Actions
    • 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)s
          • If - Conditions
            • (Mana of (Picked unit)) Greater than 0
          • Then - Actions
            • Unit - Unpause (Picked unit)
          • Else - Actions
            • Unit - Pause (Picked unit)
thatll do the trick
 
Level 3
Joined
Jul 24, 2007
Messages
40
no problem bro... try this

  • Events
    • Time - Every 2 seconds of game time
  • Conditions
  • Actions
    • 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
            • (Mana of (Picked unit)) Greater than 0
          • Then - Actions
            • Unit - Unpause (Picked unit)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Equal to False
              • Then - Actions
                • Unit - Pause (Picked unit)
              • Else - Actions
                • Do nothing
now you dont have to add mana to buildings
 
Status
Not open for further replies.
Top