PVP Event [Trigger Help]

Malli

New Member
Reaction score
5
Hi there,

I have been trying to make this Trigger work for quite some time now, but it always ends up choosing a building or choosing 200 of the enemy creeps instead of 1 hero for each side of the arena. I dont even think I have got the pause units right :confused:. I would greatly appreciate any help.

The Trigger I have:

Code:
PVP Event 1
    Events
        Map initialization
    Conditions
    Actions
        Wait 320.00 game-time seconds
        Unit - Pause all units
        Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 5 (Yellow) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 6 (Orange) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 8 (Pink) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility across PVP Visibility <gen>
        Visibility - Create an initially Enabled visibility modifier for Player 10 (Light Blue) emitting Visibility across PVP Visibility <gen>
        Camera - Pan camera for Player 1 (Red) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 2 (Blue) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 3 (Teal) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 4 (Purple) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 5 (Yellow) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 6 (Orange) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 7 (Green) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 8 (Pink) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 9 (Gray) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Camera - Pan camera for Player 10 (Light Blue) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Game - Display to (All players) for 16.50 seconds the text: In 60 Seconds an it...
        Wait 1.50 game-time seconds
        Game - Display to (All players) for 15.00 seconds the text: The winner of this ...
        Wait 1.00 game-time seconds
        Set PlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Player Group - Pick every player in PlayerGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) is an ally of Player 11 (Dark Green)) Equal to True
                        ((Triggering unit) is A Hero) Equal to True
                        ((Triggering unit) is A structure) Not equal to True
                        ((Triggering unit) is Summoned) Not equal to True
                    Then - Actions
                        Unit - Move (Random unit from (Units owned by (Random player from (All allies of Player 11 (Dark Green))))) instantly to (Center of West PVP player <gen>)
                    Else - Actions
                        Unit - Unpause (Picked unit)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) is an ally of Player 12 (Brown)) Equal to True
                        ((Triggering unit) is A Hero) Equal to True
                        ((Triggering unit) is A structure) Not equal to True
                        ((Triggering unit) is Summoned) Not equal to True
                    Then - Actions
                        Unit - Move (Random unit from (Units owned by (Random player from (All allies of Player 12 (Brown))))) instantly to (Center of East PVP player <gen>)
                    Else - Actions
                        Unit - Unpause (Picked unit)
        Custom script:   call DestroyForce(udg_PlayerGroup)
        Wait 60.00 game-time seconds
        Item - Create Circlet of Nobility at (Center of Item Spawn <gen>)
I have a good feeling all of this is wrong, but im just starting to learn the ways of GUI.
Thank you and Respect,

(*$malli$*)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Instead of Map Initialization, why not do:
Code:
Events
    Elapsed game time is 320.00 seconds
?

Also, there's multiple leaks throughout that trigger.
 

Malli

New Member
Reaction score
5
Ah yes (duh).

I have this trigger disabled because I know it has plenty of leaks, but before I fix the leaks I was just wanting the Trigger to actually work first.

Thanks WolfieNoCT anyway, I never would have thought to put the elapsed time there.
Respect,

(*$malli$*)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Code:
                        ((Triggering unit) is A Hero) Equal to True
                        ((Triggering unit) is A structure) Not equal to True
                        ((Triggering unit) is Summoned) Not equal to True
Why is the first one of the Conditions (Picked unit) then those are all trig unit?
Code:
Unit - Move (Random unit from (Units owned by (Random player from (All allies of Player 12 (Brown))))) instantly to (Center of East PVP player <gen>)
Why Random unit?

Also, use loops for the visibility and camera;
A lot neater and more efficient.
 

Malli

New Member
Reaction score
5
Thank you,

You see that's why I couldn't stop the buildings being chosen, because it was in "Triggered Unit" when it should have been "picked"!

What do I use instead of "Random Unit" because I want it to pick 1 random hero from each team and I thought that's how you do it?

*Edit* Oh and please could you give an example of the loop for the visibility etc if you can, sorry about the hassle :s.
Respect,

(*$malli$*)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Random unit should be fine then.
Here's the loop:
Code:
Actions
     For each (Integer A) from 1 to (Number of players), do (Actions)
        Loop - Actions
            Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across (Playable map area)
     For each (Integer A) from 1 to (Number of players), do (Actions)
        Loop - Actions
            Camera - Pan camera for (Player((Integer A))) to (Center of (Playable map area)) over 0.00 seconds
(Number of players) can be changed to 10.
Also, (Playable map area) and (Center of (Playable map area)) need to be changed to the regions you want.
 

Malli

New Member
Reaction score
5
Ok thank you very much +Rep :)

Even though I have now got it allot tidier nothing appears in the arena, here is the Trigger i have got now:

Code:
PVP Event 1
    Events
        Time - Elapsed game time is 20.00 seconds
    Conditions
    Actions
        Unit - Pause all units
        For each (Integer A) from 1 to (Number of players), do (Actions)
            Loop - Actions
                Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across PVP Visibility <gen>
        For each (Integer A) from 1 to (Number of players), do (Actions)
            Loop - Actions
                Camera - Pan camera for (Player((Integer A))) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Game - Display to (All players) for 16.50 seconds the text: In 60 Seconds an it...
        Wait 1.50 game-time seconds
        Game - Display to (All players) for 15.00 seconds the text: The winner of this ...
        Wait 1.00 game-time seconds
        Set PlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Player Group - Pick every player in PlayerGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (((Picked player) is an ally of Player 11 (Dark Green)) Equal to True) and ((((Picked unit) is A Hero) Equal to True) and ((((Picked unit) is A structure) Not equal to True) and (((Picked unit) is Summoned) Not equal to True)))
                    Then - Actions
                        Unit - Move (Random unit from (Units owned by (Random player from (All allies of Player 11 (Dark Green))))) instantly to (Center of West PVP player <gen>)
                    Else - Actions
                        Unit - Unpause (Picked unit)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (((Picked player) is an ally of Player 12 (Brown)) Equal to True) and ((((Picked unit) is A Hero) Equal to True) and ((((Picked unit) is A structure) Not equal to True) and (((Picked unit) is Summoned) Not equal to True)))
                    Then - Actions
                        Unit - Move (Random unit from (Units owned by (Random player from (All allies of Player 12 (Brown))))) instantly to (Center of East PVP player <gen>)
                    Else - Actions
                        Unit - Unpause (Picked unit)
        Custom script:   call DestroyForce(udg_PlayerGroup)
        Wait 60.00 game-time seconds
        Item - Create Circlet of Nobility at (Center of Item Spawn <gen>)

I just dont know why nothing happens (appart from the pan of camera and visibility), no Hero appears, not even a building. Something must be wrong, ill look into it anyway, thanks again for the help.
Respect,

(*$malli$*)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Why is the Unpause (Picked unit) in Else - Actions?
Also, for the Conditions;
Make them three seperate conditions,
Not "... and ... and ...".
It's a lot easier ;) .

Also try this:
Don't set PlayerGroup to all players;
Set it to a random unit, then just move that unit to the arena.
 

Malli

New Member
Reaction score
5
Ok I have done almost everything you have said and i now have this:

Code:
PVP Event 1
    Events
        Time - Elapsed game time is 320.00 seconds
    Conditions
    Actions
        Unit - Pause all units
        For each (Integer A) from 1 to (Number of players), do (Actions)
            Loop - Actions
                Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across PVP Visibility <gen>
        For each (Integer A) from 1 to (Number of players), do (Actions)
            Loop - Actions
                Camera - Pan camera for (Player((Integer A))) to (Center of PVP Visibility <gen>) over 0.00 seconds
        Game - Display to (All players) for 16.50 seconds the text: In 60 Seconds an it...
        Wait 1.50 game-time seconds
        Game - Display to (All players) for 15.00 seconds the text: The winner of this ...
        Wait 1.00 game-time seconds
        Set PlayerGroup2 = (All allies of Player 11 (Dark Green))
        Set PlayerGroup3 = (All allies of Player 12 (Brown))
        Set AttackersEast = (Units in Players East <gen> owned by (Random player from PlayerGroup3))
        Set AttackersWest = (Units in Players West <gen> owned by (Random player from PlayerGroup2))
        Set PlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Player Group - Pick every player in PlayerGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to True
                        ((Picked unit) is A structure) Not equal to True
                        ((Picked unit) is Summoned) Not equal to True
                    Then - Actions
                        Unit - Move (Random unit from AttackersEast) instantly to (Center of West PVP player <gen>)
                        Unit - Unpause (Picked unit)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to True
                        ((Picked unit) is A structure) Not equal to True
                        ((Picked unit) is Summoned) Not equal to True
                    Then - Actions
                        Unit - Move (Random unit from AttackersWest) instantly to (Center of East PVP player <gen>)
                        Unit - Unpause (Picked unit)
                    Else - Actions
                        Do nothing
        Custom script:   call DestroyGroup(udg_AttackersEast)
        Custom script:   call DestroyGroup(udg_AttackersWest)
        Custom script:   call DestroyForce(udg_PlayerGroup)
        Custom script:   call DestroyForce(udg_PlayerGroup2)
        Custom script:   call DestroyForce(udg_PlayerGroup3)
        Wait 60.00 game-time seconds
        Unit - Unpause all units
        Item - Create Circlet of Nobility at (Center of Item Spawn <gen>)

With the PlayerGroup I cannot set it to 1 random player from allies of "blah blah". It will only let me select all allies of player "blah blah". I will keep trying.
Respect,

(*$malli$*)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Remove Do Nothing;
All it does is call a function that does nothing,
The do nothing is implied if nothing is there ;) .
And could you send me the map so I can take a look?
"[email protected]"
Without the quotes.
 

Malli

New Member
Reaction score
5
i still need help on this everyone who is reading this, Wolfie and me don't know why its not working. Anyone ells got any ideas please? +Rep for atleast trying to help with this trigger.

*EDIT* Please delete this thread, im going to post another thread with my similar but new problem.
Respect,

(*$malli$*)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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