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

[Trigger] Duel Trigger help

Status
Not open for further replies.
Level 6
Joined
Dec 26, 2007
Messages
125
I need 3 triggers:

1:
when end of a timer,
moves instantly all playing heros to the arena
2:
when only 1 hero remains in arena,
teleports him out of arena and give to triggering player 500 gold
3:
Restarts timer

(or unless u could do so that it restarts the timer in second trigger)
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Start Trigger:
  • Start
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for Timer with title BLABLA
      • Set TimerW = (Last created timer window)
      • Countdown Timer - Show TimerW
This trigger must be started when you want the timer to run for the first time.

Duel trigger:
  • Duel
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempP = (Owner of TempUnit)
          • Set Loc[(Player number of TempP)] = (Position of TempUnit)
          • Set TempLoc = (Random point in Arena)
          • Unit - Move TempUnit instantly to TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
      • Trigger - Turn on End <gen>
In the group "Heroes" you must add all the heroes that are supposed to enter the arena.

End trigger:
  • End
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Number of units in (Units in Arena)) Equal to 1
    • Actions
      • Trigger - Run Start <gen> (checking conditions)
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempP = (Owner of TempUnit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Arena contains TempUnit) Equal to True
            • Then - Actions
              • Unit - Move TempUnit instantly to Loc[(Player number of TempP)]
              • Player - Add 500 to TempP Current gold
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Loc[GetConvertedPlayerId(udg_TempP)])
      • Trigger - Turn off (This trigger)
This trigger must be initially off.
 
Status
Not open for further replies.
Top