• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Need help with some more gui please.

Status
Not open for further replies.
Just multiply the money by amount of units of type Circle of Power owned by player.
 
  • Trigger1
  • Events
    • Time - Every 10.00 seconds of game-time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set Temp_Group = (Units owned by Player(IntegerA) of type Circle of Power)
        • Player - Add ((your base gold amount)*(Number of units in Temp_Group)) to (Player(IntegerA))
        • Custom script: call DestoryGroup (udg_Temp_Group)
 
Thank you again Pharaoh :D

oh btw +rep for helping me out.

{EDIT}
Alright, i got to #2 I want to make a circle of power be owned if it got less then half of its hp ?
 
Last edited by a moderator:
  • Trigger2
  • Events
    • Time - Every 1.00 second of game-time
  • Conditions
  • Actions
    • Set Group = (Units of type (Circle of Power))
    • Unit Group - Pick up every unit in Group and do (Actions)
      • Loop - Actions
        • If/ Then/ Else
          • If (Conditions)
            • ((Life of (Picked unit)) Less than or Equal to (0.5*(Max Life of (Picked unit)))
          • Then (Actions)
            • Unit - Change ownership of (Picked unit) to X
          • Else (Actions)
    • Custom script: call DestroyGroup (udg_Group)
 
you can do it like this so you don´t have to pick units every second


use the first trigger only if you have <Your Unit Type> in beginning of game
  • PICK EVERY UNIT OF TYPE
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UNITGROUP = (Units of type <Your Unit Type>)
      • Unit Group - Pick every unit in UNITGROUP and do (Actions)
        • Loop - Actions
          • Trigger - Add to HEALTH LEASS THAN 50% <gen> the event (Unit - (Picked unit)'s life becomes Less than ((Percentage life of (Picked unit)) - 50.00))
      • Custom script: call DestroyGroup(udg_UNITGROUP)
      • Trigger - Turn off (This trigger)
  • IF NEW UNIT OF TYPE ENTERS (if you train/build new unit)
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to <Your Unit Type>
    • Actions
      • Trigger - Add to HEALTH LEASS THAN 50% <gen> the event (Unit - (Entering unit)'s life becomes Less than ((Percentage life of (Entering unit)) - 50.00))
  • HEALTH LEASS THAN 50%
    • Events
    • Conditions
    • Actions
      • -------- whatever you want---------(use triggering unit to refer to the damaged unit) --------
 
Well, you can do it by triggers witch is harder, and I cant post em right now.

Or, you can go to game settings. There you can select that 1 of 12 players is rescueable. So every unit that belongs to him will be rescued by another player when a unit comes close to rescueable unit.
But this requires that you separate 1 player spot unable to be played. So cant be used in maps for 12 players.

I am not in pozicion to make trigger version right now. Not at hmme :p
 
Status
Not open for further replies.
Back
Top