• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Gold for Mana

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2012
Messages
204
I have tried it but im stuck again...i cant find a function that reduces the mana of a unit for a special amount..only a "set mana to" function...
im not even sure if what ive done so far is what you have described...

Code:
test
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Mining Facility) 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 or equal to 10.00
                    Then - Actions
                        Player - Add 10 to (Owner of (Picked unit)) Current gold
                    Else - Actions
 
  • test
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Mining Facility) 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 or equal to 10.00
            • Then - Actions
              • Player - Add 10 to (Owner of (Picked unit)) Current gold
            • Else - Actions
You should also upload triggers using trigger tags. And if they are big enough use hidden tags.

[hidden="Trigger name normally here"][trigger]paste copied trigger here[/trigger][/hidden]

Looks like this.
  • paste copied trigger here
 
Status
Not open for further replies.
Top