• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Duel Trigger Request

Status
Not open for further replies.
Level 6
Joined
Jun 11, 2009
Messages
151
Well I'm working on a hero arena type map and I have every thing working correctly but my duel trigger so i want to ask if some one could create one for me.

I need a trigger that, if you have played an Angel Arena map how it moves the team leader for each team with highest kill to the duel section and moves the non-team leader to a section seat on each side for each team, then after the duels over it sends the units back to where they were in the map.
 
Last edited:
Level 15
Joined
Aug 11, 2009
Messages
1,606
Here is a way to do it...
  • Variables for Duel
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set DuelPlayerTextPoint[1] = (Center of Text place 1 <gen>)
      • Set DuelPlayerTextPoint[2] = (Center of Text place 2 <gen>)
      • Set DuelPlayerTextPoint[3] = (Center of Text place 3 <gen>)
      • Set DuelPlayerTextPoint[4] = (Center of Text place 4 <gen>)
      • Set DuelArenaCenter = (Center of duel center <gen>)
      • Set DuelArena = Arena <gen>
      • Set DuelistPosition[1] = (Center of duel 1 <gen>)
      • Set DuelistPosition[2] = (Center of duel 2 <gen>)
      • Set DuelistPosition[3] = (Center of duel 3 <gen>)
      • Set DuelistPosition[4] = (Center of duel 4 <gen>)
      • Set DuelSpectatorPosition[1] = (Center of spec 1 <gen>)
      • Set DuelSpectatorPosition[2] = (Center of spec 2 <gen>)
      • Set DuelSpectatorPosition[3] = (Center of spec 3 <gen>)
      • Set DuelSpectatorPosition[4] = (Center of spec 4 <gen>)
      • Set DuelSpectatorPosition[5] = (Center of spec 5 <gen>)
      • Set DuelSpectatorPosition[6] = (Center of spec 6 <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 6 (Orange)) 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 - Reset ability cooldowns for (Picked unit)
              • 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)
      • Floating Text - Create floating text that reads DuelPlayerNames[3] at DuelPlayerTextPoint[3] with Z offset 0.00, using font size 13.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set FloatingText[3] = (Last created floating text)
      • Floating Text - Create floating text that reads DuelPlayerNames[4] at DuelPlayerTextPoint[4] with Z offset 0.00, using font size 13.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set FloatingText[4] = (Last created floating text)
      • Floating Text - Create floating text that reads VS at DuelArenaCenter with Z offset 0.00, using font size 17.00, color (0.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set FloatingText[5] = (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 3.00 seconds the text: Fight begins in |CF...
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 2.00 seconds the text: |CFFF265222|r
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 1.00 seconds the text: |CFF00FF001|r
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) for 4.00 seconds the text: |CFF00FF00F|CFF33CC...
      • 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>
      • Trigger - Turn off Revive <gen>
  • Duel Check
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn on Duel Revive 1 <gen>
      • Trigger - Turn on Duel Revive 2 <gen>
      • 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 6 (Orange)) 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 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 on Revive <gen>
      • Trigger - Turn off Duel Revive 2 <gen>
      • Trigger - Turn off Blink Outside <gen>
      • Trigger - Turn off Duel Revive 1 <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 9.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 on Revive <gen>
      • Trigger - Turn off Blink Outside <gen>
      • Trigger - Turn off Duel Revive 2 <gen>
      • Trigger - Turn off Duel Revive 1 <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])
 
Last edited:
Status
Not open for further replies.
Top