• 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.

Gui advice needed

Status
Not open for further replies.
Level 17
Joined
Jan 21, 2010
Messages
2,111
I have another problem
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
  • Else - Actions
    • Set HA_Dur[HA] = (HA_Dur[HA] + 0.05)
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HA_Order[HA] Equal to (==) 0.75
        • Then - Actions
          • Set HA_Order[HA] = 0.00
          • Animation - Change HA_GhostAgi[HA] flying height to ...
          • Animation - Change HA_GhostInt[HA] flying height to ....
          • Animation - Change HA_GhostStr[HA] flying height to ...
          • Set GlobalPoint[1] = (Position of HA_GhostStr[HA])
          • Set GlobalPoint[2] = (Position of HA_GhostAgi[HA])
          • Set GlobalPoint[3] = (Position of HA_GhostInt[HA])
          • Set GlobalPoint[4] = (Position of HA_Caster[HA])
          • Unit - Order HA_GhostStr[HA] to Move To (Random point in....
          • Unit - Order HA_GhostAgi[HA] to Move To (Random point in ....
          • Unit - Order HA_GhostInt[HA] to Move To (Random point in ....
          • Custom script: set bj_wantDestroyGroup = true
          • Set GlobalGroup[0] = (Units within 100.00 of GlobalPoint[1] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of HA_Caster[HA])) Equal to (==) False) and (((Mat
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in GlobalGroup[0] and do (Actions)
            • Loop - Actions
              • Unit - Cause HA_GhostStr[HA] to damage (Picked unit), dealing (Real(HA_DamageStr[HA])) damage of attack type Hero and damage type Universal
          • Custom script: set bj_wantDestroyGroup = true
          • Set GlobalGroup[1] = (Units within 100.00 of GlobalPoint[2] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of HA_Caster[HA])) Equal to (==) False) and (((Mat
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in GlobalGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Cause HA_GhostAgi[HA] to damage (Picked unit), dealing (Real(HA_DamageAgi[HA])) damage of attack type Hero and damage type Universal
          • Custom script: set bj_wantDestroyGroup = true
          • Set GlobalGroup[2] = (Units within 100.00 of GlobalPoint[3] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of HA_Caster[HA])) Equal to (==) False) and (((Mat
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in GlobalGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Cause HA_GhostInt[HA] to damage (Picked unit), dealing (Real(HA_DamageInt[HA])) damage of attack type Hero and damage type Universal
          • Custom script: call RemoveLocation(udg_GlobalPoint[1])
          • Custom script: call RemoveLocation(udg_GlobalPoint[2])
          • Custom script: call RemoveLocation(udg_GlobalPoint[3])
          • Custom script: call RemoveLocation(udg_GlobalPoint[4])
        • Else - Actions
          • Set HA_Order[HA] = (HA_Order[HA] + 0.05)
Is this leak?
Sorry for bad spelling...
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
I think you don't really know how to copy triggers.
Go to the trigger editor, right-click the trigger name above "events" and select "copy as text".
Then you can just go ahead and paste it here.
(You can also copy events/conditions/actions and even single functions as text).

Also: what the two above me said.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Do them like this:

  • Set region = Region centered at GlobalPoint[4] with size (1200.00, 1200.00)
  • Set point = Random point in region
  • Unit - Order HA_GhostStr[HA] to Move To point
  • call RemoveLocation(udg_point)
  • call RemoveRect(udg_region)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 100.00 of GlobalPoint[1] matching...and do (Actions)
    • Loop - Actions
 
There is no need for setting a group into a variable when you are destroying the unit group with the function
page.gif
Custom script: set bj_wantDestroyGroup = true
instead you just do the conditions in the action
unitgroup.gif
Unit Group - Pick every unit in (Conditions) and do (Actions)
joinbottom.gif
actions.gif
Loop - Actions
You only need to set something in a variable if you're gonna use it or destroy it specifically if you do need it(or whatever) and in this case you don't need to set the unit group as said you should just set it in strait in the action because
page.gif
Custom script: set bj_wantDestroyGroup = true
destroys what unit group is gonna be made next and doesn't need a persific name as you see in the custom string it doesn't use a name for the function to work but sets the next unit group and then destroys it after the action has ended:p

edit:
Also with the action
unit.gif
Unit - Order HA_GhostInt[HA] to Move To (Random point in ....
you will need to clear the leak in that as it will create a point and therefore leaking a point.​
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Edit:
Ok i understand, so, i don't need to create t group, one in a variable, and the other in unit Group - pick every unit in...?
You only need either "set bj_wantDestroyGroup = true", OR set GroupVariable = group, call DestroyGroup(udg_GroupVariable).
NOT both.

So you can choose between:
  • Actions
    • Set unitGroup = (Units in (Playable map area))
    • Unit Group - Pick every unit in unitGroup and do (Actions)
      • Loop - Actions
    • Custom script: call DestroyGroup(udg_unitGroup)
And:

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
These are the options, nothing else.
You combined these two triggers (first setting the variable, then using the bj_wantDestroyGroup).
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
You only need either "set bj_wantDestroyGroup = true", OR set GroupVariable = group, call DestroyGroup(udg_GroupVariable).
NOT both.

So you can choose between:
  • Actions
    • Set unitGroup = (Units in (Playable map area))
    • Unit Group - Pick every unit in unitGroup and do (Actions)
      • Loop - Actions
    • Custom script: call DestroyGroup(udg_unitGroup)
And:

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
These are the options, nothing else.
You combined these two triggers (first setting the variable, then using the bj_wantDestroyGroup).
Okay, so for my problem is the call destroygroup (udg_yourgroupvarb) is enough?
Okay2..
Thanks apocalypse
 
Status
Not open for further replies.
Top