Help with this trigger?

Burningicce9

Cool Member
Reaction score
1
I'm currently writing a duel system for my Hero Arena. There are teamed duels every 7 minutes, and I need a way to detect when the duels have ended. This happens when all the Hero-type units left in the duel arena belong to one team. I can't think of a way to write a trigger (GUI, i can't do JASS) that will do this. Here is the trigger i have so far. I also made some notes in red about other problems i'm having.

Code:
Starting the Duel
    Events
        Time - dueltimer expires
    Conditions
    Actions
        Countdown Timer - Destroy dueltimerwindow
        Trigger - Turn off North Revive <gen>
        Trigger - Turn off South Revive <gen>
        Trigger - Turn off North Arena Revive <gen>
        Trigger - Turn on South Arena Revive <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (PlayerHeros[(Player number of (Triggering player))] is dead) Equal to True
            Then - Actions
                Hero - Instantly revive (Triggering unit) at (Random point in Arena Middle <gen>), Show revival graphics
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Dying unit)) is an ally of Player 1 (Red)) Equal to True
                    Then - Actions
                        Hero - Instantly revive (Triggering unit) at (Center of North Revive <gen>), Show revival graphics
                    Else - Actions
                        Hero - Instantly revive (Triggering unit) at (Center of South Revive <gen>), Show revival graphics
            Else - Actions
        Unit - Pause all units
        Unit Group - Pick every unit in Champions and do (Unit - Remove All buffs from (Picked unit))
        Unit Group - Pick every unit in Champions and do (Actions)
            Loop - Actions
                Set HeroPostarray[(Player number of (Picked player))] = (Position of PlayerHeros[(Player number of (Picked player))])
                Set HeroLife[(Player number of (Picked player))] = (Life of (Picked unit))
                Set HeroMana[(Player number of (Triggering player))] = (Mana of (Picked unit))
        Unit Group - Pick every unit in Champions and do (Unit - Set life of (Picked unit) to 100.00%)
        Unit Group - Pick every unit in Champions and do (Unit - Set mana of (Picked unit) to 100.00%)
        Player Group - Pick every player in (All players controlled by a User player) and do (Camera - Pan camera for (Picked player) to (Center of Duel <gen>) over 0.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 Norht 1 <gen>), facing (Center of Arena Middle <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 North 2 <gen>), facing (Center of Arena Middle <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 North 3 <gen>), facing (Center of Arena Middle <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 North 4 <gen>), facing (Center of Arena Middle <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 north 5 leader <gen>), facing (Center of Arena Middle <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 south 1 <gen>), facing (Center of Arena Middle <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 South 2 <gen>), facing (Center of Arena Middle <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 South 5 <gen>), facing (Center of Arena Middle <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 south 1 leader <gen>), facing (Center of Arena Middle <gen>))
        Unit Group - Pick every unit in (Units owned by Player 10 (Light Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Unit - Move (Picked unit) instantly to (Center of south 4 <gen>), facing (Center of Arena Middle <gen>))
        Game - Display to (All players) the text: The duel has begun!...
        Unit Group - Pick every unit in Champions and do (Unit - Unpause (Triggering unit))
        Wait until [COLOR="Red"] All the Heroes on one side belong to one team. [/COLOR]
        Unit Group - Pick every unit in (Units in Duel <gen> matching (((Matching unit) is A Hero) Equal to True)) and do (Unit Group - Add (Triggering unit) to Winner)
        Unit Group - Pick every unit in Winner and do (Actions)
            Loop - Actions [COLOR="Red"]This currently doesn't work since winners is just an empty unit group, and i dont have a way to store all the winning units .[/COLOR] 
        Game - Display to (All players) the text: (The Duel is over + ((Name of (Random player from Winners)) + 's team is victorious! They will be rewarded with bonus gold, and +2 to all stats)) [COLOR="Red"]This also doesn't work, i want ot make it display the player name of a random unit from Winners)[/COLOR] 
        Unit Group - Pick every unit in Winner and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
                    Then - Actions
                        Hero - Modify Strength of (Picked unit): Add 2
                        Hero - Modify Agility of (Picked unit): Add 2
                        Hero - Modify Intelligence of (Picked unit): Add 2
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) belongs to an ally of Player 6 (Orange)) Equal to True
                            Then - Actions
                                Hero - Modify Strength of (Picked unit): Add 2
                                Hero - Modify Agility of (Picked unit): Add 2
                                Hero - Modify Intelligence of (Picked unit): Add 2
                            Else - Actions
                                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) is A Hero) Equal to True
                (PlayerHeros[(Player number of (Triggering player))] is dead) Equal to True
            Then - Actions
                Hero - Instantly revive (Matching unit) at (Center of Duel <gen>), Hide revival graphics
            Else - Actions
        Unit Group - Pick every unit in Champions and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to HeroLife[(Player number of (Picked player))]
                Unit - Set life of (Picked unit) to HeroMana[(Player number of (Picked player))]
        Unit - Unpause all units
        Countdown Timer - Start dueltimer as a One-shot timer that will expire in 420.00 seconds
        Countdown Timer - Create a timer window for dueltimer with title Time until next due...
        Set dueltimerwindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
        Trigger - Turn off South Arena Revive <gen>
        Trigger - Turn off South Arena Revive <gen>
        Trigger - Turn on North Revive <gen>
        Trigger - Turn on South Revive <gen>
        Wait until ((Owner of (Triggering unit)) Equal to Player 1 (Red)), checking every 1.00 seconds

Feel free to point out any other flaws (I'm sure there are plenty, I'm pretty new at triggering).

Yes i know it also will have crazy leaks, i wont worry about plugging those until last (although if anyone wants to do it for me, I'd be okay with that ^_^, since i've never done that before)

Thank you in advance for any help
 
D

Down

Guest
A unit Dies
Count Number of units in unit group , unit in region matching is a hero equal to true AND Unit is a enemy of killing unit equal to true = 0

Pick all units in unit group
unit in region matching is a hero equal to true AND Unit is a enemy of killing unit equal to false
(do what you would do to then winners here)
 

Burningicce9

Cool Member
Reaction score
1
A unit Dies
Count Number of units in unit group , unit in region matching is a hero equal to true AND Unit is a enemy of killing unit equal to true = 0

Pick all units in unit group
unit in region matching is a hero equal to true AND Unit is a enemy of killing unit equal to false
(do what you would do to then winners here)

I don't see an action to count number of units in unit group, what is it under? (I tried search also)
 

the Lumpy

►►►
Reaction score
53
I don't see an action to count number of units in unit group, what is it under? (I tried search also)
It is a function that returns an integer value, so you'll use it in place of an integer. Example:
Code:
Set random_integer_variable = (Number of units in random_unit_group)


As for your trigger, I would recommend splitting it into several different triggers (e.g. one that starts the battle, one that checks whether it's over every time someone dies, one that resets everything after someone wins, etc.). That would make it easier, as you would have a trigger dedicated to checking whether a player has won.

I would use a trigger like this:
Code:
Check Winner
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
        duel_is_going_on Equal to True
    Actions
        Set temp_winning_player = Neutral Passive
        Unit Group - Pick every unit in (Units in duel_region matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        temp_winning_player Equal to Neutral Passive
                    Then - Actions
                        Set temp_winning_player = (Owner of (Picked unit))
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Owner of (Picked unit)) Equal to temp_winning_player
                            Then - Actions
                                Do nothing
                            Else - Actions
                                Skip remaining actions
        Trigger - Run End Dual <gen> (checking conditions)
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
You are creating a hero arena and need some trigger.. OKey;)
I would have done something like this...
At map init you pick all players that is in the "left" team to be in a "playergroup-variable". And all the players in the "right" to be in a variable-playergroup called "right"...
Then I would have these triggers:
Code:
TeleportToBase
    Events
        Unit - A unit enters TeleportHeroToBase <gen>
    Conditions
    Actions
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Triggering unit)) is in Right) Equal to True
            Then - Actions
                Unit - Move (Triggering unit) instantly to (Center of RightBase <gen>)
            Else - Actions
                Unit - Move (Triggering unit) instantly to (Center of LeftBase <gen>)
The "TeleportHeroToBase" is just a region, that is not reachable for any units, no matter if the duel is on or not...Then you got this Unit-Variable called "Hero"... And this means if player 1 enters that region, it will "save" his hero in a variable "Hero[1]"..if it is player 2 blue, it will save his hero in "hero[2]". How does the unit enters this Region? Well that is simple, if a hero dies you revive it in this region and when you create /a player picks a hero he wants, you create it in this region.
Code:
Initialize
    Events
        Map initialization
    Conditions
    Actions
        Set Regions[1] = North1 <gen>
        Set Regions[2] = North2 <gen>
        Set Regions[3] = South1 <gen>
        Set Regions[4] = South2 <gen>
This is the map init trigger... It just sets some few regions that you are using in the duel...Why? Well, you will see:) (hopefully)
Code:
TimerExpires
    Events
        Time - timer expires
    Conditions
    Actions
        Set Duel = True
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Set point = (Center of Regions[(Integer A)])
                Unit - Move Hero[(Integer A)] instantly to (Center of Regions[(Integer A)])
                Custom script:   call RemoveLocation(udg_point)
This trigger runs when timer expires (ofc you need a lot more actions!!! but, I just saw you had a odd way of moving all units into each regions when the timer expired...What i mean? All those acionts : Pick every unit owner by pl1 matching is a hero = true..blablabla..;)
Therefore you can instead just use that one... In this example there are only 4 players and 4 regions (south1 and 2 and north1 and 2), therefore For each integer A - 1 -4!... This one is also leakfree (as for now)

Code:
Duel Ends
    Events
        Unit - A unit Dies
    Conditions
        intro Equal to True
    Actions
        If (((Owner of (Triggering unit)) is in Humans) Equal to True) then do (Set LivesSouth = (LivesSouth - 1)) else do (Set LivesNorth = (LivesNorth - 1))
         If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        LivesSouth Equal to 0
    Then - Actions
        Game - Display to (All players) the text: North won the duel!
        Unit Group - Pick every unit in (Units in DuelArena <gen>) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to (Center of TeleportHeroToBase <gen>)
    Else - Actions
This last trigger is the Duel Ends trigger... It checks if Duel = true (which is a boolean Variable) if that is true it will run this trigger, check if the Lives are 0 in one of the teams, if it is... it gives victory, ofc, this trigger is not complete, nor are any of the others, but yeye... You need also to check in this trigger , IF the livesNorth = 0 and do so the South team wins... so, that i'll leave up to you... Oh and when timer expires you set the Lives = how many players is playing(heroes in the duel arena for each team..yeye:))
Cheerio;)

Variables Used:
Left - PLayergroup Variable
Right - Playergroup Variable
Hero - Unit variable - Array = Yes
Regions - Region Variable - Array = Yes
point - Point Variable
LivesSouth - IntegerVariable
Livesnorhth - Integer Variable
Duel - Boolean Variable
timer - Timer Variable
 

Burningicce9

Cool Member
Reaction score
1
You guys are amazing, you replied very fast and thoroughly. Although I'm not sure I quite understand

@The Lumpy. So the trigger you wrote there will keep set every player = to temp_winning_hero, and keep repeating that? I don't see how this works, could you explain the logistics of this?


@ManyTimes I don't understand how your starting trigger works. If the event to trigger the trigger is A unit enters TeleportHeroToBase, and you say that TeleportHeroToBase isn't a region how will that ever trigger?

The way you showed me of moving the units to their regions is much prettier :p, and being leak free = good.

The way to end the duel is also cool. So basically I set the lives of each team to the number of players on the team, and when a hero from that team dies i set the lives to (Current lives - 1)?


I'll update my first post with an updated trigger once i finish it.

Thanks again :)

Edit: Ah, now I understand what you meant, about storing the Heroes to an array. Once a player picks a hero, it is transported to a small region near the back of its base (which is also teh same region used for reviving in)
 

the Lumpy

►►►
Reaction score
53
@The Lumpy. So the trigger you wrote there will keep set every player = to temp_winning_hero, and keep repeating that? I don't see how this works, could you explain the logistics of this?
It checks to see whether the owner of each next unit is the same as the temp_winning_hero (i.e. owner of the last unit). If it is different, then you know that there are still units from more than one player. If it is the same each time, then you know that all the units belong to the same player.

But, now I see that you needed it to check teams, not individual players... How are you keeping track of the teams? If you had two player groups (one for each team), I could probably edit that trigger so it would work with teams...
 

Burningicce9

Cool Member
Reaction score
1
Okay. After much work, I think I have finally come up with a system that works.

I've copied all of the triggers I'm using, and wrote what I want them to do below.

Code:
Teams
    Events
        Map initialization
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 1 (Red) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 2 (Blue) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 2 (Blue) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 3 (Teal) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 3 (Teal) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 4 (Purple) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 4 (Purple) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 5 (Yellow) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 5 (Yellow) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 3 (Teal) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 3 (Teal) to NorthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 6 (Orange) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 6 (Orange) to SouthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 7 (Green) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 7 (Green) to SouthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 8 (Pink) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 8 (Pink) to SouthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 9 (Gray) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 9 (Gray) to SouthTeamPlayers
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 10 (Light Blue) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add Player 10 (Light Blue) to SouthTeamPlayers
            Else - Actions
                Do nothing


Adds all playing players to their appropriate player group. The only problem with this is that if someone joins the game and then goes afk the whole game, duels will never end :(. Is there a way i can add a trigger that removes them from the group if they dont have a hero after 5 or so minutes?

Code:
North Heroes
    Events
        Unit - A unit enters North Revive <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set PlayerHeros[(Player number of (Owner of (Entering unit)))] = (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (((Triggering unit) is A Hero) Equal to True) and (((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True)
            Then - Actions
                Unit Group - Add (Triggering unit) to NorthHeroes
            Else - Actions
                Do nothing

Makes a Unit Group with all the North Heroes

Code:
South Heroes
    Events
        Unit - A unit enters South Revive <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set PlayerHeros[(Player number of (Owner of (Entering unit)))] = (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (((Triggering unit) is A Hero) Equal to True) and (((Owner of (Triggering unit)) is an ally of Player 1 (Orange)) Equal to True)
            Then - Actions
                Unit Group - Add (Triggering unit) to SouthHeroes
            Else - Actions
                Do nothing

Makes a Unit group with all of the South Heroes

Player is transported to North/south Revive upon picking their hero, depending on which team they are on. Since they are also revived in this region, i will probably have to change this to a region that they enter once and never enter again (or is there away to turn this off once # of units in South heroes = # of playing on South team?)

Code:
Champions
    Events
        Time - Elapsed game time is 10.00 seconds
    Conditions
    Actions
        Unit Group - Add all units of NorthHeroes to Champions
        Unit Group - Add all units of SouthHeroes to Champions

Champions is a unit group with all of the Heroes in it.

Code:
Starting the Duel
    Events
        Time - dueltimer expires
    Conditions
    Actions
        Countdown Timer - Destroy dueltimerwindow
        Trigger - Turn off North Revive <gen>
        Trigger - Turn off South Revive <gen>
        Trigger - Turn off North Arena Revive <gen>
        Trigger - Turn on South Arena Revive <gen>
        Trigger - Turn off Duel Leave <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (PlayerHeros[(Player number of (Triggering player))] is dead) Equal to True
            Then - Actions
                Hero - Instantly revive (Triggering unit) at (Random point in Arena Middle <gen>), Show revival graphics
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Dying unit)) is an ally of Player 1 (Red)) Equal to True
                    Then - Actions
                        Hero - Instantly revive (Triggering unit) at (Center of North Revive <gen>), Show revival graphics
                    Else - Actions
                        Hero - Instantly revive (Triggering unit) at (Center of South Revive <gen>), Show revival graphics
            Else - Actions
        Unit - Pause all units
        Unit Group - Pick every unit in Champions and do (Unit - Remove All buffs from (Picked unit))
        Unit Group - Pick every unit in Champions and do (Actions)
            Loop - Actions
                Set HeroPostarray[(Player number of (Picked player))] = (Position of PlayerHeros[(Player number of (Picked player))])
                Set HeroLife[(Player number of (Picked player))] = (Life of (Picked unit))
                Set HeroMana[(Player number of (Triggering player))] = (Mana of (Picked unit))
        Unit Group - Pick every unit in Champions and do (Unit - Set life of (Picked unit) to 100.00%)
        Unit Group - Pick every unit in Champions and do (Unit - Set mana of (Picked unit) to 100.00%)
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set Point = (Center of Regions[(Integer A)])
                Unit - Move PlayerHeros[(Integer A)] instantly to (Center of Regions[(Integer A)])
                Custom script:   call RemoveLocation(udg_point)
        Player Group - Pick every player in (All players controlled by a User player) and do (Camera - Pan camera for (Picked player) to (Center of Regions[(Integer A)]) over 0.00 seconds)
        Game - Display to (All players) the text: The duel has begun!...
        Trigger - Turn on Winning team <gen>

This is what I hope this trigger does:

Turns on/off appropriate triggers (North Arena revive & South Arena Revive both revive the heroes who die during the duel on the sidelines, and make them invul + paused as "watchers"). Then revives all dead players. Then it stores the position/life/mana of each of the Heroes to their appropriate array. After that, it heals them to full hp/mana. Then it moves the heroes into the regions i want them to be in (all locations in the duel arena), and moves the camera to the duel center. then turns on winning team <gen>

Code:
Lives
    Events
    Conditions
    Actions
        Set LivesNorth = (Number of players in NorthTeamPlayers)
        Set LivesSouth = (Number of players in SouthTeamPlayers)

Sets the lives of each team.

Code:
Winning team
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True) then do (Set LivesNorth = (LivesNorth - 1)) else do (If (((Owner of (Triggering unit)) is an ally of Player 6 (Orange)) Equal to True) then do (Set LivesSouth = (LivesSouth - 1)) else do (Do nothing))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                LivesNorth Equal to 0
            Then - Actions
                Game - Display to (All players) the text: The duel  is over, ...
                Unit Group - Pick every unit in SouthHeroes and do (Actions)
                    Loop - Actions
                        Hero - Modify Strength of (Picked unit): Add 2
                        Hero - Modify Agility of (Picked unit): Add 2
                        Hero - Modify Intelligence of (Picked unit): Add 2
                Player Group - Pick every player in SouthTeamPlayers and do (Player - Add 100 to (Picked player) Current gold)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        LivesSouth Equal to 0
                    Then - Actions
                        Game - Display to (All players) the text: The duel  is over, ...
                        Unit Group - Pick every unit in NorthHeroes and do (Actions)
                            Loop - Actions
                                Hero - Modify Strength of (Picked unit): Add 2
                                Hero - Modify Agility of (Picked unit): Add 2
                                Hero - Modify Intelligence of (Picked unit): Add 2
                        Player Group - Pick every player in NorthTeamPlayers and do (Player - Add 100 to (Picked player) Current gold)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (LivesNorth Equal to 0) or (LivesSouth Equal to 0)
                            Then - Actions
                                Wait 2.00 seconds
                                Unit Group - Pick every unit in Champions and do (Actions)
                                    Loop - Actions
                                        Unit - Set life of (Picked unit) to HeroLife[(Player number of (Owner of (Picked unit)))]
                                        Unit - Set life of (Picked unit) to HeroMana[(Player number of (Owner of (Picked unit)))]
                                        Unit - Move (Picked unit) instantly to HeroPostarray[(Player number of (Owner of (Picked unit)))]
                                Unit - Unpause all units
                                Countdown Timer - Start dueltimer as a One-shot timer that will expire in 420.00 seconds
                                Countdown Timer - Create a timer window for dueltimer with title Time until next duel
                                Set dueltimerwindow = (Last created timer window)
                                Countdown Timer - Show (Last created timer window)
                                Trigger - Turn off South Arena Revive <gen>
                                Trigger - Turn off South Arena Revive <gen>
                                Trigger - Turn on North Revive <gen>
                                Trigger - Turn on South Revive <gen>
                                Trigger - Turn off Duel Leave <gen>
                                Trigger - Turn off Winning team <gen>
                            Else - Actions

This is what I want this trigger to do:

If a unit dies set the lives of the team whose hero died to one less then one they were. When the lives of either team reach zero (they have no heroes left), give the winning team 100 gold each and +2 to all stats. Then return all the heroes to their previous life/mana/position, and restarting the timer.

Thank you again for your help ^^.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top