Having problems with my duel trigger

Astal

New Member
Reaction score
1
I took it from another map, its a tutorial map so im pretty sure the person didnt mind its just a map that shows how to make an arena.

Its not working right for me and i was wondering if someone could help me modify it. The problem im having is Team 1s hero works right. It moves it to the duel view area and then to the arena. Team 2 only moves to the duel view area and not the arena. I copied the trigger completely over to my map, all variables and regions are the same as in the base map. Im not advanced enough to design my own or i would have and this trigger seems a bit complicated for me.

If someone could help me avoid moving the dueling units to the viewing platform completely and just to the arena that would be great.

Also i dont see where this starts another duel timer after the first one. So if anyone could help me out id appreciate it. If needed i can upload my map.

Here are the triggers

Trigger:
  • First Duel
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Destroy DuelTWindow
      • Quest - Display to (All players) the Quest Update message: The first Duel will...
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)


Trigger:
  • Duel Begins
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Quest - Display to (All players) the Quest Update message: It's Duel Time!
      • Countdown Timer - Destroy DuelTWindow
      • Set DuelTime = True
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Player Group - Pick every player in Forces[(Integer A)] and do (Actions)
            • Loop - Actions
              • Set DuelGroup[(Integer A)] = (Units owned by (Picked player) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))
              • Unit Group - Pick every unit in DuelGroup[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Unit - Pause (Picked unit)
                  • Unit - Make (Picked unit) Invulnerable
                  • Set DuelPoint[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Owner of (Picked unit)) is in Forces[1]) Equal to True
                    • Then - Actions
                      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Viewer 1 <gen>)
                    • Else - Actions
                      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Viewer 2 <gen>)
                  • Unit - Move (Picked unit) instantly to DuelViewPoint[(Player number of (Owner of (Picked unit)))]
                  • Camera - Pan camera for (Owner of (Picked unit)) to DuelViewPoint[(Player number of (Owner of (Picked unit)))] over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_DuelViewPoint[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))])
                  • Selection - Clear selection for (Owner of (Picked unit))
      • Trigger - Run Check Groups <gen> (ignoring conditions)


Trigger:
  • Check Groups
    • Events
    • Conditions
    • Actions
      • For each (Integer IntegerD) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in DuelGroup[IntegerD]) Equal to 0
            • Then - Actions
              • For each (Integer IntegerE) from 1 to 3, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Player(IntegerE)) slot status) Equal to Is playing
                    • Then - Actions
                      • Set TempPoint = (Center of Duel Area <gen>)
                      • Hero - Instantly revive Hero[IntegerE] at TempPoint, Hide revival graphics
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Hero[IntegerE] belongs to an ally of Player 1 (Red)) Equal to True
                        • Then - Actions
                          • Unit Group - Add Hero[IntegerE] to DuelGroup[1]
                        • Else - Actions
                          • Unit Group - Add Hero[IntegerE] to DuelGroup[2]
                    • Else - Actions
            • Else - Actions
      • Wait 2.00 seconds
      • Trigger - Run Prepare Heroes <gen> (ignoring conditions)


Trigger:
  • Prepare Heroes
    • Events
    • Conditions
    • Actions
      • For each (Integer B) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set DuelUnit[(Integer B)] = (Random unit from DuelGroup[(Integer B)])
          • Unit - Move DuelUnit[(Integer B)] instantly to DuelSpawn[(Integer B)]
          • Selection - Select DuelUnit[(Integer B)] for (Owner of DuelUnit[(Integer B)])
          • Set TempPoint = (Position of DuelUnit[(Integer B)])
          • Camera - Pan camera for (Owner of DuelUnit[(Integer B)]) to TempPoint over 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Unit - Reset ability cooldowns for DuelUnit[(Integer B)]
          • Unit - Set mana of DuelUnit[(Integer B)] to 100.00%
          • Unit - Set life of DuelUnit[(Integer B)] to 100.00%
          • Unit - Make DuelUnit[(Integer B)] Vulnerable
          • Unit - Unpause DuelUnit[(Integer B)]
      • Trigger - Turn on Enter View Stand <gen>
      • Wait 1.50 seconds
      • Trigger - Run Anti Stuck Trigger <gen> (ignoring conditions)
      • Wait 1.50 seconds
      • Trigger - Run Anti Stuck Trigger <gen> (ignoring conditions)


Trigger:
  • Anti Stuck Trigger
    • Events
    • Conditions
    • Actions
      • Unit - Unpause DuelUnit[1]
      • Unit - Unpause DuelUnit[2]


Trigger:
  • Duel Ends
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) Equal to DuelUnit[1]) or ((Triggering unit) Equal to DuelUnit[2])
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[1]
        • Then - Actions
          • Set WinInteger = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[2]
        • Then - Actions
          • Set WinInteger = 1
        • Else - Actions
      • Quest - Display to (All players) the Quest Update message: ((Name of (Owner of DuelUnit[WinInteger])) + is victorious!)
      • Player - Add 200 to (Owner of DuelUnit[WinInteger]) Current gold
      • Wait 2.00 game-time seconds
      • Unit - Reset ability cooldowns for DuelUnit[WinInteger]
      • Unit - Set mana of DuelUnit[WinInteger] to 100.00%
      • Unit - Set life of DuelUnit[WinInteger] to 100.00%
      • Set DuelUnit[1] = No unit
      • Set DuelUnit[2] = No unit
      • 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 DuelPoint[(Player number of (Owner of (Picked unit)))]
              • Custom script: call RemoveLocation(udg_DuelPoint[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))])
              • Unit - Unpause (Picked unit)
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Set DuelTime = False
      • Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Unit - Unpause (Picked unit))
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Wait 10.00 game-time seconds
      • Countdown Timer - Destroy DuelTWindow
      • Quest - Display to (All players) the Quest Update message: The next Duel will ...
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)
      • Trigger - Turn off Enter View Stand <gen>


Trigger:
  • Enter View Stand
    • Events
      • Unit - A unit enters Duel Viewer 1 <gen>
      • Unit - A unit enters Duel Viewer 2 <gen>
    • Conditions
      • ((Triggering unit) Equal to DuelUnit[1]) or ((Triggering unit) Equal to DuelUnit[2])
    • Actions
      • Set TempPoint = (Center of Duel Area <gen>)
      • Unit - Move (Triggering unit) instantly to TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of (Triggering unit)) Less than or equal to 50.00
        • Then - Actions
          • Unit - Set life of (Triggering unit) to 1.00
        • Else - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 50.00)
 

Astal

New Member
Reaction score
1
Ok i attached my map. I have no idea whats wrong here and could really use some help any help at all.

Thanks guys

:banghead::banghead::banghead:
 

Attachments

  • X Men Arena.w3x
    91.7 KB · Views: 118

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Ill test now Astal.
Please repost your problem here so i can look it over.
 

Astal

New Member
Reaction score
1
Ill test now Astal.
Please repost your problem here so i can look it over.

Thanks man i appreciate it.

Team 2's hero moves to the viewing area but not the duel area. He just stays stuck in the duel viewing area.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Hmmm so he goes it the wrong region ok checking. How can i test if it worked?
 

Astal

New Member
Reaction score
1
Hmmm so he goes it the wrong region ok checking. How can i test if it worked?

No he goes in the right region.

The way the trigger is, they go to the duel viewing area, and then right to the duel area. Team 2 stays stuck in the duel viewing area.

Just play as yellow on team 2. Wait for the duel and then youll see.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Hmmm i tested it. I was red and vsed pink but i got stuck saying im invulnerable
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Shit i got no idea why it doesnt work i think just remake the system or post the map u got it from.
 

Astal

New Member
Reaction score
1
Shit i got no idea why it doesnt work i think just remake the system or post the map u got it from.

yeah, i have no idea how to make my own or i would. The map i got em from is this
 

Attachments

  • [Template] Duel v1.1.w3x
    41.3 KB · Views: 128

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Shit sorry dude i really just cant see a problem... I think you should request a new SIMPLE system i would do it but im busy finishing my map's ai which is a BITCH.
 

Astal

New Member
Reaction score
1
OK i decided to just edit that the best i could but i need some help.

I need to set the Unit on team 1 to DuelUnit[1] am i doing it correctly below. I need to do that because that is how the are removed from the duel when one wins ect..


Trigger:
  • If - Conditions
    • ((Owner of (Picked unit)) is in Forces[1]) Equal to True
    • Then - Actions
      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Spawn 1 <gen>)
      • Set DuelUnit[1] = (Picked unit)
    • Else - Actions
      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Spawn 2 <gen>)
      • Set DuelUnit[2] = (Picked unit)



Trigger:
  • Duel Ends
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) Equal to DuelUnit[1]) or ((Triggering unit) Equal to DuelUnit[2])
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[1]
        • Then - Actions
          • Set WinInteger = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[2]
        • Then - Actions
          • Set WinInteger = 1
        • Else - Actions
      • Quest - Display to (All players) the Quest Update message: ((Name of (Owner of DuelUnit[WinInteger])) + is victorious!)
      • Player - Add 200 to (Owner of DuelUnit[WinInteger]) Current gold
      • Wait 2.00 game-time seconds
      • Unit - Reset ability cooldowns for DuelUnit[WinInteger]
      • Unit - Set mana of DuelUnit[WinInteger] to 100.00%
      • Unit - Set life of DuelUnit[WinInteger] to 100.00%
      • Set DuelUnit[1] = No unit
      • Set DuelUnit[2] = No unit
      • 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 DuelPoint[(Player number of (Owner of (Picked unit)))]
              • Custom script: call RemoveLocation(udg_DuelPoint[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))])
              • Unit - Unpause (Picked unit)
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Set DuelTime = False
      • Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Unit - Unpause (Picked unit))
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Wait 10.00 game-time seconds
      • Countdown Timer - Destroy DuelTWindow
      • Quest - Display to (All players) the Quest Update message: The next Duel will ...
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
First part you only gave a small part im not even sure if you picked the unit.
 

Astal

New Member
Reaction score
1
Ok its putting everyone in duel now i need to figure out how to make it pick a random person. Also if a player is dead they wont duel.

Trigger:
  • Duel Begins
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Quest - Display to (All players) the Quest Update message: It's Duel Time!
      • Countdown Timer - Destroy DuelTWindow
      • Set DuelTime = True
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Player Group - Pick every player in Forces[(Integer A)] and do (Actions)
            • Loop - Actions
              • Set DuelGroup[(Integer A)] = (Units owned by (Picked player) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))
              • Unit Group - Pick every unit in DuelGroup[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Set DuelPoint[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit))
                  • Unit - Reset ability cooldowns for (Picked unit)
                  • Unit - Set mana of (Picked unit) to 100.00%
                  • Unit - Set life of (Picked unit) to 100.00%
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Owner of (Picked unit)) is in Forces[1]) Equal to True
                    • Then - Actions
                      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Spawn 1 <gen>)
                      • Set DuelUnit[1] = (Picked unit)
                    • Else - Actions
                      • Set DuelViewPoint[(Player number of (Owner of (Picked unit)))] = (Random point in Duel Spawn 2 <gen>)
                      • Set DuelUnit[2] = (Picked unit)
                  • Unit - Move (Picked unit) instantly to DuelViewPoint[(Player number of (Owner of (Picked unit)))]
                  • Camera - Pan camera for (Owner of (Picked unit)) to DuelViewPoint[(Player number of (Owner of (Picked unit)))] over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_DuelViewPoint[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))])
                  • Selection - Clear selection for (Owner of (Picked unit))


Trigger:
  • Duel Ends
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) Equal to DuelUnit[1]) or ((Triggering unit) Equal to DuelUnit[2])
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[1]
        • Then - Actions
          • Set WinInteger = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to DuelUnit[2]
        • Then - Actions
          • Set WinInteger = 1
        • Else - Actions
      • Quest - Display to (All players) the Quest Update message: ((Name of (Owner of DuelUnit[WinInteger])) + is victorious!)
      • Player - Add 200 to (Owner of DuelUnit[WinInteger]) Current gold
      • Wait 2.00 game-time seconds
      • Unit - Reset ability cooldowns for DuelUnit[WinInteger]
      • Unit - Set mana of DuelUnit[WinInteger] to 100.00%
      • Unit - Set life of DuelUnit[WinInteger] to 100.00%
      • Set DuelUnit[1] = No unit
      • Set DuelUnit[2] = No unit
      • 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 DuelPoint[(Player number of (Owner of (Picked unit)))]
              • Custom script: call RemoveLocation(udg_DuelPoint[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))])
              • Unit - Unpause (Picked unit)
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
      • Set DuelTime = False
      • Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Unit - Unpause (Picked unit))
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Wait 10.00 game-time seconds
      • Countdown Timer - Destroy DuelTWindow
      • Quest - Display to (All players) the Quest Update message: The next Duel will ...
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Actions
    • -------- Set up Random Hero Array --------
    • Set Random_Hero_Array[1] = Player 1's Hero
    • Set Random_Hero_Array[2] = Player 2's Hero
    • Set Num_Heroes = 2

Something like this?
Then make a trigger to pick the random unit.
 

Astal

New Member
Reaction score
1
Is there a way to pick a random unit in a unit group instead of all units in unit group?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top