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:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      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