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

Confused by Groups...

Status
Not open for further replies.
Level 15
Joined
Aug 11, 2009
Messages
1,606
Ok,here are the triggers:
  • Duel End Team 2 win
    • Events
    • Conditions
      • (All units of DuelGroup[4] are dead) Equal to True
    • Actions
      • Trigger - Turn off Duel Check <gen>
      • Unit - Pause all units
      • Special Effect - Create a special effect at DuelArenaCenter using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Game - Display to (All players) for 9.00 seconds the text: |CFF27B1CCCongraula...
      • -------- ------------------------------------------- --------
      • -------- Pauses all units, create special effect, and displays a win message --------
      • -------- ------------------------------------------- --------
      • For each (Integer A) from 6 to 10, do (Actions)
        • Loop - Actions
          • Player - Add 350 to (Player((Integer A))) Current gold
      • -------- ------------------------------------------- --------
      • -------- Adds gold to players.. --------
      • -------- ------------------------------------------- --------
      • Wait 2.00 seconds
      • Set DuelTempGroup[2] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in DuelTempGroup[2] and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Player((Player number of (Owner of (Picked unit))))) to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))] over 0.40 seconds
          • Unit - Move (Picked unit) instantly to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))]
      • Unit - Unpause all units
      • Unit Group - Pick every unit in DuelGroup[1] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit Group - Pick every unit in DuelGroup[2] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit - Remove All buffs from (Picked unit)
      • -------- ------------------------------------------- --------
      • -------- Moves all units back to their position --------
      • -------- ------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Custom script: call DestroyGroup(udg_DuelGroup[4])
      • Custom script: call DestroyGroup(udg_DuelGroup[5])
      • Custom script: call DestroyGroup(udg_DuelTempGroup[2])
      • Trigger - Run Duel timer <gen> (ignoring conditions)
      • Trigger - Turn off Blink Outside <gen>
  • Duel End Team 1 win
    • Events
    • Conditions
      • (All units of DuelGroup[5] are dead) Equal to True
    • Actions
      • Trigger - Turn off Duel Check <gen>
      • Unit - Pause all units
      • Special Effect - Create a special effect at DuelArenaCenter using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Game - Display to (All players) for 8.00 seconds the text: |CFFFB3B4FCongratul...
      • -------- ------------------------------------------- --------
      • -------- Pauses all units, create special effect, and displays a win message --------
      • -------- ------------------------------------------- --------
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Player - Add 350 to (Player((Integer A))) Current gold
      • -------- ------------------------------------------- --------
      • -------- Adds gold to players.. --------
      • -------- ------------------------------------------- --------
      • Wait 2.00 seconds
      • Set DuelTempGroup[2] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in DuelTempGroup[2] and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Player((Player number of (Owner of (Picked unit))))) to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))] over 0.40 seconds
          • Unit - Move (Picked unit) instantly to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))]
      • Unit - Unpause all units
      • Unit Group - Pick every unit in DuelGroup[1] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit Group - Pick every unit in DuelGroup[2] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit - Remove All buffs from (Picked unit)
      • -------- ------------------------------------------- --------
      • -------- Moves all units back to their position --------
      • -------- ------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Custom script: call DestroyGroup(udg_DuelGroup[4])
      • Custom script: call DestroyGroup(udg_DuelGroup[5])
      • Custom script: call DestroyGroup(udg_DuelTempGroup[2])
      • Trigger - Run Duel timer <gen> (ignoring conditions)
      • Trigger - Turn off Blink Outside <gen>
The other part works pretty fine except this one...
 
why is the winning message on top?

if this trigger will run (that is if the conditions are met of if you use the Trigger- Run Trigger (Ignoring Conditions)) then the players will always win but it must be before the units get teleported, I dont know why they get teleported first before getting the winning message.....
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Ok,Here is the whole trigger...hope you find what's wrong.
  • Variables for Duel
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set DuelPlayerTextPoint[1] = (Center of FloatingText1 <gen>)
      • Set DuelPlayerTextPoint[2] = (Center of FloatingText2 <gen>)
      • Set DuelArenaCenter = (Center of ArenaCenter <gen>)
      • Set DuelArena = Arena <gen>
      • Set DuelistPosition[1] = (Center of Duel1 <gen>)
      • Set DuelistPosition[2] = (Center of Duel2 <gen>)
      • Set DuelSpectatorPosition[1] = (Center of Spec1 <gen>)
      • Set DuelSpectatorPosition[2] = (Center of Spec2 <gen>)
      • Set DuelSpectatorPosition[3] = (Center of Spec3 <gen>)
      • Set DuelSpectatorPosition[4] = (Center of Spec4 <gen>)
      • Set DuelSpectatorPosition[5] = (Center of Spec5 <gen>)
      • Set DuelSpectatorPosition[6] = (Center of Spec6 <gen>)
  • Duel timer
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 5.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel in:
      • Set DuelTimerWindow = (Last created timer window)
      • Countdown Timer - Show DuelTimerWindow
  • Duel start
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Unit - Pause all units
      • Sound - Play GameFound <gen>
      • Countdown Timer - Destroy DuelTimerWindow
      • Game - Display to (All players) for 3.00 seconds the text: Duel Time!
      • Wait 2.00 seconds
      • Set DuelPointIndex = 1
      • Set DuelGroup[1] = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))
      • Set DuelGroup[2] = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 8 (Pink)) Equal to True)))
      • Unit Group - Pick every unit in DuelGroup[1] and do (Unit - Make (Picked unit) Invulnerable)
      • Unit Group - Pick every unit in DuelGroup[2] and do (Unit - Make (Picked unit) Invulnerable)
      • -------- ------------------------------------------- --------
      • -------- -------- Above is a trigger where you make 2 groups essentialy spliting the heroes into the 2 forces (Different groups)-------- --------
      • -------- ------------------------------------------- --------
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in DuelGroup[(Integer A)] and do (Actions)
            • Loop - Actions
              • Set DuelCurrentPosition[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit))
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
              • Unit - Remove Negative buffs from (Picked unit)
              • -------- ------------------------------------------- --------
              • -------- This saves the position of every hero in the variable, and restores their hp, mana, and cooldowns --------
              • -------- ------------------------------------------- --------
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set DuelTempUnit = (Random unit from DuelGroup[(Integer A)])
              • Set DuelPlayerNames[DuelPointIndex] = (Name of (Owner of DuelTempUnit))
              • Unit - Move DuelTempUnit instantly to DuelistPosition[DuelPointIndex], facing Default building facing degrees
              • Unit Group - Remove DuelTempUnit from DuelGroup[(Integer A)]
              • Unit Group - Add DuelTempUnit to DuelGroup[3]
              • -------- ------------------------------------------- --------
              • -------- group[3] is for the purpose of unpausing the units who are dueling. --------
              • -------- ------------------------------------------- --------
              • Set DuelPointIndex = (DuelPointIndex + 1)
      • Set DuelPointIndex = 1
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in DuelGroup[(Integer A)] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to DuelSpectatorPosition[DuelPointIndex], facing DuelArenaCenter
              • Set DuelPointIndex = (DuelPointIndex + 1)
              • -------- ------------------------------------------- --------
              • -------- This is for the spectators --------
              • -------- ------------------------------------------- --------
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Player((Integer A))) to DuelArenaCenter over 1.00 seconds
      • Floating Text - Create floating text that reads DuelPlayerNames[1] at DuelPlayerTextPoint[1] with Z offset 0.00, using font size 13.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set FloatingText[1] = (Last created floating text)
      • Floating Text - Create floating text that reads DuelPlayerNames[2] at DuelPlayerTextPoint[2] with Z offset 0.00, using font size 13.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set FloatingText[2] = (Last created floating text)
      • Wait 4.50 seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Floating Text - Destroy FloatingText[(Integer A)]
      • Game - Display to (All players) for 4.00 seconds the text: |c006666ffD|c006969...
      • Wait 1.00 seconds
      • Game - Display to (All players) for 3.00 seconds the text: |c00ff00003|r
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 2.00 seconds the text: |c00ff00002|r
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 1.00 seconds the text: |c00ff00001|r
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 4.00 seconds the text: |c0033ff00F|c0028f4...
      • Sound - Play GoodJob <gen>
      • -------- ------------------------------------------- --------
      • -------- Pretty Self Explanatory, Just does a countdown and starts the duel --------
      • -------- ------------------------------------------- --------
      • Unit Group - Pick every unit in DuelGroup[3] and do (Unit - Unpause (Picked unit))
      • Unit Group - Pick every unit in DuelGroup[3] and do (Unit - Make (Picked unit) Vulnerable)
      • Wait 1.00 seconds
      • Trigger - Turn on Duel Check <gen>
      • Trigger - Turn on Blink Outside <gen>
  • Duel Check
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set DuelGroup[4] = (Units in DuelArena matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • -------- ------------------------------------------- --------
      • -------- This will just check every second to see if the units are dead --------
      • -------- ------------------------------------------- --------
      • Set DuelGroup[5] = (Units in DuelArena matching (((Matching unit) belongs to an ally of Player 8 (Pink)) Equal to True))
      • Trigger - Run Duel End Team 2 win <gen> (checking conditions)
      • Trigger - Run Duel End Team 1 win <gen> (checking conditions)

  • Duel End Team 2 win
    • Events
    • Conditions
      • (All units of DuelGroup[4] are dead) Equal to True
    • Actions
      • Trigger - Turn off Duel Check <gen>
      • Unit - Pause all units
      • Special Effect - Create a special effect at DuelArenaCenter using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Game - Display to (All players) for 8.00 seconds the text: |CFF27B1CCCongraula...
      • -------- ------------------------------------------- --------
      • -------- Pauses all units, create special effect, and displays a win message --------
      • -------- ------------------------------------------- --------
      • For each (Integer A) from 6 to 10, do (Actions)
        • Loop - Actions
          • Player - Add 350 to (Player((Integer A))) Current gold
      • -------- ------------------------------------------- --------
      • -------- Adds gold to players.. --------
      • -------- ------------------------------------------- --------
      • Wait 2.00 seconds
      • Set DuelTempGroup[2] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in DuelTempGroup[2] and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Player((Player number of (Owner of (Picked unit))))) to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))] over 0.40 seconds
          • Unit - Move (Picked unit) instantly to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))]
      • Unit - Unpause all units
      • Unit Group - Pick every unit in DuelGroup[1] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit Group - Pick every unit in DuelGroup[2] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit - Remove All buffs from (Picked unit)
      • -------- ------------------------------------------- --------
      • -------- Moves all units back to their position --------
      • -------- ------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Custom script: call DestroyGroup(udg_DuelGroup[4])
      • Custom script: call DestroyGroup(udg_DuelGroup[5])
      • Custom script: call DestroyGroup(udg_DuelTempGroup[2])
      • Trigger - Run Duel timer <gen> (ignoring conditions)
      • Trigger - Turn off Blink Outside <gen>
  • Duel End Team 1 win
    • Events
    • Conditions
      • (All units of DuelGroup[5] are dead) Equal to True
    • Actions
      • Trigger - Turn off Duel Check <gen>
      • Unit - Pause all units
      • Special Effect - Create a special effect at DuelArenaCenter using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Game - Display to (All players) for 8.00 seconds the text: |CFFFB3B4FCongratul...
      • -------- ------------------------------------------- --------
      • -------- Pauses all units, create special effect, and displays a win message --------
      • -------- ------------------------------------------- --------
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Player - Add 350 to (Player((Integer A))) Current gold
      • -------- ------------------------------------------- --------
      • -------- Adds gold to players.. --------
      • -------- ------------------------------------------- --------
      • Wait 2.00 seconds
      • Set DuelTempGroup[2] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in DuelTempGroup[2] and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Player((Player number of (Owner of (Picked unit))))) to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))] over 0.40 seconds
          • Unit - Move (Picked unit) instantly to DuelCurrentPosition[(Player number of (Owner of (Picked unit)))]
      • Unit - Unpause all units
      • Unit Group - Pick every unit in DuelGroup[1] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit Group - Pick every unit in DuelGroup[2] and do (Unit - Make (Picked unit) Vulnerable)
      • Unit - Remove All buffs from (Picked unit)
      • -------- ------------------------------------------- --------
      • -------- Moves all units back to their position --------
      • -------- ------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Custom script: call DestroyGroup(udg_DuelGroup[4])
      • Custom script: call DestroyGroup(udg_DuelGroup[5])
      • Custom script: call DestroyGroup(udg_DuelTempGroup[2])
      • Trigger - Run Duel timer <gen> (ignoring conditions)
      • Trigger - Turn off Blink Outside <gen>

  • Blink Outside
    • Events
      • Unit - A unit leaves Arena <gen>
    • Conditions
      • DuelIsDead[(Player number of (Owner of (Triggering unit)))] Equal to False
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit - Move (Triggering unit) instantly to DuelArenaCenter


  • Teleportation
    • Events
      • Unit - A unit enters (Current camera bounds)
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set TeleportPoint[1] = DuelArenaCenter
      • Unit - Move (Entering unit) instantly to TeleportPoint[1]
      • Camera - Pan camera for (Owner of (Entering unit)) to TeleportPoint[1] over 1.00 seconds
      • Custom script: call RemoveLocation(udg_TeleportPoint[1])
Trigger works,but partially.It just chooses my allies to fight,and before duel starts i win.
Also i would like some one to help add 1 thing in my trigger.Make spectators invulnerable.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
I can't believe i didn't notice that...That fixed most part of.+rep for you PvSvN.
Now another problem has showed up...
My duel is supposed to start at 15 seconds.
After the first 10 seconds,the time where the Countdown Time is supposed to be created my hero is teleported into the Arena.He must be teleported at 15 seconds...
 
Status
Not open for further replies.
Top