Duel Won't End (Was: Quick Help)

Turtlehead91

New Member
Reaction score
0
I am making a team duel where one team can challenge the other at any time. The challenge works, the duel is accepted or declined works, and the start of the duel works. But my trigger to end it won't work. can you help me pls? Here they are. (Regions 243 and 246 are the regoins tey step on to accpet the challenge)
Trigger:
  • Accepted
    • Events
      • Unit - A unit enters Region 246 <gen>
      • Unit - A unit enters Region 243 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((TeamDuelDChall Equal to 1) and (((Owner of (Triggering unit)) Equal to Player 1 (Red)) or (((Owner of (Triggering unit)) Equal to Player 2 (Blue)) or (((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) or (((Owner of (Triggering unit)) Equal to Playe or ((TeamDuelLChall Equal to 1) and (((Owner of (Triggering unit)) Equal to Player 3 (Teal)) or (((Owner of (Triggering unit)) Equal to Player 4 (Purple)) or (((Owner of (Triggering unit)) Equal to Player 7 (Green)) or (((Owner of (Triggering unit)) Equal to Pla
    • Actions
      • Set TeamDuelDChall = 0
      • Set TeamDuelLChall = 0
      • Countdown Timer - Destroy (Last created timer window)
      • Quest - Display to (All players) the Quest Discovered message: Your Challenge has ...
      • Countdown Timer - Pause DuelEnd
      • Countdown Timer - Pause timer
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 20.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Time Till Team Duel
      • Wait 20.00 game-time seconds
      • Countdown Timer - Destroy (Last created timer window)
      • Trigger - Turn off Infernal Spawns <gen>
      • Trigger - Turn off spawn light units <gen>
      • Trigger - Turn off spawn dark units <gen>
      • Trigger - Turn off Gold give <gen>
      • Trigger - Turn off End the duel <gen>
      • Sound - Stop music After fading
      • Quest - Display to (All players) the Hint message: TIME FOR A DUEL !
      • Unit - Pause all units
      • Wait 1.00 seconds
      • If (UpgradeTimeExp Equal to True) then do (Environment - Create at (Entire map) the weather effect Northrend Blizzard) else do (Environment - Create at (Entire map) the weather effect Ashenvale Rain (Light))
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Quest - Display to (All players) the Quest Update message: A player is waiting...) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • If (PlayerisDead Greater than or equal to 1) then do (Wait 3.00 seconds) else do (Do nothing)
      • Unit - Unpause all units
      • Unit - Pause all units
      • Unit - Unpause Fruit Stand 0028 <gen>
      • Unit Group - Pick every unit in (Units in DuelArea <gen>) and do (Unit - Unpause (Picked unit))
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of LightDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of LightDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of LightDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 8 (Pink) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of LightDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 9 (Gray) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of LightDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 3 (Teal) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of DarkDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 4 (Purple) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of DarkDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 6 (Orange) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of DarkDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 7 (Green) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of DarkDuel <gen>))
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of DarkDuel <gen>))
      • Wait 2.00 seconds
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 3 (Teal) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 4 (Purple) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 5 (Yellow) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 6 (Orange) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 7 (Green) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 8 (Pink) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 9 (Gray) to (Center of Region 148 <gen>) over 2.00 seconds
      • Camera - Pan camera for Player 11 (Dark Green) to (Center of Region 148 <gen>) over 2.00 seconds
      • Wait 2.00 seconds
      • Camera - Set the camera bounds for Player 1 (Red) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 2 (Blue) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 5 (Yellow) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 8 (Pink) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 9 (Gray) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 3 (Teal) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 4 (Purple) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 6 (Orange) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 7 (Green) to DuelArea <gen>
      • Camera - Set the camera bounds for Player 11 (Dark Green) to DuelArea <gen>
      • Unit Group - Pick every unit in (Units in DuelArea <gen>) and do (Unit - Remove All buffs from (Picked unit))
      • Sound - Play Doom <gen>
      • Sound - Set volume of Doom <gen> to 50.00%
      • Wait 10.00 seconds
      • Sound - Play prepare <gen>
      • Wait 1.00 seconds
      • Quest - Display to (All players) the Hint message: Prepare To Fight!!!
      • Unit Group - Pick every unit in (Units in DuelArea <gen>) and do (Unit - Set life of (Picked unit) to 100.00%)
      • Wait 0.50 seconds
      • Unit Group - Pick every unit in (Units in DuelArea <gen>) and do (Unit - Set mana of (Picked unit) to 100.00%)
      • Wait 0.50 seconds
      • Quest - Display to (All players) the Hint message: Ready...
      • Wait 0.50 seconds
      • Quest - Display to (All players) the Hint message: FIGHT !!!
      • Unit Group - Pick every unit in (Units in DarkDuel <gen>) and do (Unit - Unpause (Picked unit))
      • Unit Group - Pick every unit in (Units in LightDuel <gen>) and do (Unit - Unpause (Picked unit))
      • Set LteamDuelers = (Number of units in (Units in DuelArea <gen> matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) Equal to Player 1 (Red)) or (((Owner of (Matching unit)) Equal to Player 2 (Blue)) or (((Owner of (Matching unit)) Equal to Pla
      • Set DteamDuelers = (Number of units in (Units in DuelArea <gen> matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) Equal to Player 3 (Teal)) or (((Owner of (Matching unit)) Equal to Player 4 (Purple)) or (((Owner of (Matching unit)) Equal to
      • Set LTeamDueler = (Real(LteamDuelers))
      • Set DTeamDueler = (Real(DteamDuelers))
      • Trigger - Turn on LVar <gen>
      • Trigger - Turn on LVar Copy 5 <gen>
      • Trigger - Turn on DVar <gen>
      • Trigger - Turn on DVar Copy 5 <gen>

i set a trigger to tell me what LTeamDueler and LTeamDueler where and they equaled 1 and 1. (I play my brother to test)

Trigger:
  • LVar
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
          • (Owner of (Triggering unit)) Equal to Player 8 (Pink)
          • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    • Actions
      • Set LTeamDueler = (LTeamDueler - 1.00)


Trigger:
  • DVar
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
          • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
          • (Owner of (Triggering unit)) Equal to Player 7 (Green)
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Set DTeamDueler = (DTeamDueler - 1.00)


Trigger:
  • LVar Copy 5
    • Events
      • Game - LTeamDueler becomes Equal to 0.00
    • Conditions
    • Actions
      • Quest - Display to (All players) the Warning message: Dark Has Won the Te...
      • Player - Add 500 to Player 3 (Teal) Current gold
      • Player - Add 500 to Player 4 (Purple) Current gold
      • Player - Add 500 to Player 5 (Yellow) Current gold
      • Player - Add 500 to Player 7 (Green) Current gold
      • Player - Add 500 to Player 11 (Dark Green) Current gold
      • Trigger - Run End <gen> (ignoring conditions)


Trigger:
  • DVar Copy 5
    • Events
      • Game - DTeamDueler becomes Equal to 0.00
    • Conditions
      • DteamDuelers Equal to 0
    • Actions
      • Quest - Display to (All players) the Warning message: Light Has Won the T...
      • Player - Add 500 to Player 1 (Red) Current gold
      • Player - Add 500 to Player 2 (Blue) Current gold
      • Player - Add 500 to Player 5 (Yellow) Current gold
      • Player - Add 500 to Player 8 (Pink) Current gold
      • Player - Add 500 to Player 9 (Gray) Current gold
      • Trigger - Run End <gen> (ignoring conditions)

the end trigger here under this text never initiates nor do i receive the quest message i should when the TeamDueler = 0. I am hopeing i made a blond mistake somewhere...
Trigger:
  • End
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off DVar <gen>
      • Trigger - Turn off DVar Copy 5 <gen>
      • Trigger - Turn off LVar <gen>
      • Trigger - Turn off LVar Copy 5 <gen>
      • Camera - Set the camera bounds for Player 1 (Red) to (Entire map)
      • Camera - Set the camera bounds for Player 2 (Blue) to (Entire map)
      • Camera - Set the camera bounds for Player 3 (Teal) to (Entire map)
      • Camera - Set the camera bounds for Player 4 (Purple) to (Entire map)
      • Camera - Set the camera bounds for Player 5 (Yellow) to (Entire map)
      • Camera - Set the camera bounds for Player 6 (Orange) to (Entire map)
      • Camera - Set the camera bounds for Player 7 (Green) to (Entire map)
      • Camera - Set the camera bounds for Player 8 (Pink) to (Entire map)
      • Camera - Set the camera bounds for Player 9 (Gray) to (Entire map)
      • Camera - Set the camera bounds for Player 11 (Dark Green) to (Entire map)
      • Wait 2.00 seconds
      • Unit - Unpause all units
      • Countdown Timer - Resume DuelEnd
      • Countdown Timer - Resume timer
      • Trigger - Turn on spawn light units <gen>
      • Trigger - Turn on Infernal Spawns <gen>
      • Trigger - Turn on spawn dark units <gen>
      • Trigger - Turn on Gold give <gen>
      • Trigger - Turn on End the duel <gen>
      • Destructible - Open Iron Gate (Horizontal) 0770 <gen>
      • Destructible - Open Iron Gate (Horizontal) 0771 <gen>
      • Sound - Stop Doom <gen> After fading
      • Sound - Play War2IntroMusic <gen>
      • Unit Group - Pick every unit in (Units of type Priest) and do (Unit - Kill (Picked unit))
      • Unit Group - Pick every unit in (Units of type Shandris) and do (Unit - Kill (Picked unit))
      • Unit Group - Pick every unit in (Units of type Shade) and do (Unit - Kill (Picked unit))
 
Please read this:
http://www.thehelper.net/forums/showthread.php?t=101956

As for your trigger, I never used that real event, and besides reals aren't always 100% accurate. A real could be supposed to be 1.00, and be 0.9999999999999 instead, because of that small inaccuracy. I would instead just add an if-then-else to the DVar trigger:
Trigger:
  • If (DTeamDueler Less than or equal to 0.01) then do (Run Dvar Copy 5) else do (Do nothing)


And to the LVar Trigger:
Trigger:
  • If (LTeamDueler Less than or equal to 0.01) then do (Run Lvar Copy 5) else do (Do nothing)


Another thing you can do is make LTeamDueler and DTeamDueler integers. They can't have that small inaccuracy since they can only be whole numbers, and it wouldn't change anything since you're removing 1.00 (a whole number) from them each time.
 
i can't do an integer because only reals are able to be in Event. But the less or equal to... I never thought of that.
Thanks
 
General chit-chat
Help Users
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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