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

[Solved] GUI Trigger Help

Status
Not open for further replies.
I have a problem. I made a spell that works fine, and it is also MUI. My problem is cleaning all of the leaks.
My function can't be:
  • Actions:
    • Custom script: call RemoveLocation(udg_Attack_Point[1])
If I would do this, it would only work when player 1 uses the ability.
So, how do I make this MUI?
Do I have to make 12 If-Then-Else actions like this:
  • Actions:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player number of (Triggering player)) equal to 1
      • Then - Actions
        • Custom script: call RemoveLocation(udg_Attack_Point[1])
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Player number of (Triggering player)) equal to 2
          • Then - Actions
            • Custom script: call RemoveLocation(udg_Attack_Point[2])
          • Else - Actions

My idea was actually something like this:


  • Actions:
  • For every (Integer A) from 1 to 12, do (Actions):
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Integer A) equal to (Player number of (Triggering player))
      • Then - Actions
        • Custom script: call RemoveLocation(udg_Attack_Point[Integer A])
      • Else - Actions
I can't put (Integer A) in the Custom Script, so what should I put in?
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Don't put (IntegerA), replace it with bj_forLoopAIndex

<<< EDIT >>>

More specific

  • Actions:
  • For every (Integer A) from 1 to 12, do (Actions):
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Integer A) equal to (Player number of (Triggering player))
      • Then - Actions
        • Custom script: call RemoveLocation(udg_Attack_Point[bj_forLoopAIndex])
      • Else - Actions
 
Status
Not open for further replies.
Top