Willing to pay $5 for a duel trigger for my map. (serious)

Astal

New Member
Reaction score
1
If thats ok to do in the forum, i didnt really read anything against it. Ive tried to adapt a trigger from another map, im just not good enough to write one on my own.

Pretty much is what im looking for is ability to set the score by typing like -score 100 or somthing.

A duel that picks one player from each team at random every 5 minutes, or the player to duel can be set by player 1 or 5 typing -d 1 for red or like -d 3 ect..


If im not allowed to put a thread like this here please delete, i was debating weather or not to post this but i dont know what else i can do :(
 

Conal

Member
Reaction score
12
What do the duels look like?
Describe what you want to happen and post any other details you might have.

Free of charge.
 

Astal

New Member
Reaction score
1
What do the duels look like?
Describe what you want to happen and post any other details you might have.

Free of charge.

Well basically all i need is a trigger. That will make a duel timer that says Duel In: 5.00 minutes

At 5 minutes all other players go to a duel viewing platform. 2 random players, 1 from each team will be sent in the arena to fight to the death. The winner will get like 200 gold or somthing and have it put like 1 point towards the winning teams score. Then the winner will be sent back where he was at the start of the duel and the loser will respawn in their base

I also need a command to set the score that determines when the game is over at game start. Like -score 50 to set it to 50 or somthing. I can post the map here too.

I tried using a trigger from a tutorial map but it didnt work. That is the trigger i currently have. It only puts a player from the first team in the arena the other player stays stuck on the viewing platform
 

Attachments

  • X Men Arena.w3x
    91.9 KB · Views: 99

Conal

Member
Reaction score
12
Well everything worked fine for me in that map unless I am missing something...

In the "First Duel" trigger, I changed it to this:
Trigger:
  • First Duel
    • Events
      • Time - Elapsed game time is 0.01 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 300.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)

In the "Duel Ends" trigger, I simply changed the "Start DuelTimer..." to 300 seconds as well.
 

Astal

New Member
Reaction score
1
Well everything worked fine for me in that map. In the "First Duel" trigger, I changed it to this:
Trigger:
  • First Duel
    • Events
      • Time - Elapsed game time is 0.01 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 300.00 seconds
      • Countdown Timer - Create a timer window for DuelTimer with title Duel Starts In:
      • Set DuelTWindow = (Last created timer window)


In the "Duel Ends" trigger, I simply changed the "Start DuelTimer..." to 300 seconds as well.

Did you try playing for team 2?

If u play as team 2 your guy will get stuck

yep just tried as team 2 he gets stuck on viewing platform
 

Conal

Member
Reaction score
12
Well you didn't mention that...I'll take a look.


What score are you referring to? Is that lumber?

Edit: Here's a quick example for a score trigger:
Trigger:
  • Score
    • Events
      • Player - Player 1 (Red) types a chat message containing -score as A substring
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Current lumber to (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string))))))
 

Astal

New Member
Reaction score
1
Well you didn't mention that...I'll take a look.


What score are you referring to? Is that lumber?

Edit: Here's a quick example for a score trigger:
Trigger:
  • Score
    • Events
      • Player - Player 1 (Red) types a chat message containing -score as A substring
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Current lumber to (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string))))))

Yeah it looks to me as its getting stuck at this trigger for team 2. Because the players health and stuff isnt getting reset like its supposed to.

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)
 

Conal

Member
Reaction score
12
Sorry it took so long. Had some things to do.

In "Check Groups" change:
Trigger:
  • For each (Integer IntegerE) from 1 to 4, do (Actions)

to "from 1 to 8" (it's currently skipping the other team)

Then, in "Choose Hero 1" add after both 'Create 1 Unit...' statements
Trigger:
  • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
 

Astal

New Member
Reaction score
1
Ok ill do that and see what happens.



Nevermind it works now. Sweet man thanks a ton. I have to make sure it works with 2 people on the same team. Do you think it will correctly only pick one from each team?
 

Conal

Member
Reaction score
12
Edit: From what it looks like, it'll pick the every player from both teams. Lol
I'll rewrite it so it should work. Gimme a minute.


If you add to the trigger "Check Groups" above the TempPoint
Trigger:
  • Game - Display to (All players) the text: (Name of (Player(IntegerE)))


Tell me what the game displays. In mine it says Player 1 and my name (hinting that it is working)

Should look like this:
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 8, 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
                      • Game - Display to (All players) the text: (Name of (Player(IntegerE)))
                      • 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)
 

Astal

New Member
Reaction score
1
If you add to the trigger "Check Groups" above the TempPoint
Trigger:
  • Game - Display to (All players) the text: (Name of (Player(IntegerE)))


Tell me what the game displays. In mine it says Player 1 and my name (hinting that it is working)

Should look like this:
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 8, 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
                      • Game - Display to (All players) the text: (Name of (Player(IntegerE)))
                      • 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)

Sorry i didnt add it to both sides for the Set Hero to blah blah. It works perfectly man thanks so much
 

Conal

Member
Reaction score
12
I rewrote Check Groups to pick a random hero from each team.

Trigger:
  • Check Groups
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Center of Duel Area <gen>)
      • For each (Integer A) 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 players in Forces[(Integer A)]) Greater than 0
            • Then - Actions
              • Set Integer = (Player number of (Random player from Forces[(Integer A)]))
              • Unit Group - Add Hero[Integer] to DuelGroup[(Integer A)]
              • Hero - Instantly revive Hero[Integer] at TempPoint, Hide revival graphics
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 2.00 seconds
      • Trigger - Run Prepare Heroes <gen> (ignoring conditions)


Glad I could help.
 

Astal

New Member
Reaction score
1
I rewrote Check Groups to pick a random hero from each team.

Trigger:
  • Check Groups
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Center of Duel Area <gen>)
      • For each (Integer A) 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 players in Forces[(Integer A)]) Greater than 0
            • Then - Actions
              • Set Integer = (Player number of (Random player from Forces[(Integer A)]))
              • Unit Group - Add Hero[Integer] to DuelGroup[(Integer A)]
              • Hero - Instantly revive Hero[Integer] at TempPoint, Hide revival graphics
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 2.00 seconds
      • Trigger - Run Prepare Heroes <gen> (ignoring conditions)


Glad I could help.

Ok do I use Integer A like you have instead of integerE (variable) like it is currently in the map?
 

Conal

Member
Reaction score
12
You'd only need a variable integer when you have more than one nested loop or conflicting loops (from the wait functions)...I don't see why that map has variable loops at all.
 

Astal

New Member
Reaction score
1
You'd only need a variable integer when you have more than one nested loop or conflicting loops (from the wait functions)...I don't see why that map has variable loops at all.

Ok, well i tried ur random way, its getting 2nd team stuck on the 2nd duel. The original way works fine so far 1v1
 
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