Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
The the trigger i made there are 4 conditions which are supposed to detect units owned by 4 different players in 4 different regions (1 for each)
Each one of them is supposed to detect a unit from a different player in my player array (comp). But i don't understand what I'm doing wrong.
B/c most of the triggers are linked to each other, its easier to just upload the map instead of link triggers.
If ((Player 1 (Red) slot status) Equal to Is playing) then do (Set red = Player 1 (Red)) else do (Do nothing)
If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Set blue = Player 2 (Blue)) else do (Do nothing)
If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Set teal = Player 3 (Teal)) else do (Do nothing)
If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Set purp = Player 4 (Purple)) else do (Do nothing)
Visibility - Disable black mask
Visibility - Disable fog of war
Comp
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players matching ((((((Picked player) is an ally of teal) Equal to True) or (((Picked player) is an ally of purp) Equal to True)) or ((((Picked player) is an ally of red) Equal to True) or (((Picked player) is an ally of blue) Equal to True))) and (((Pic and do (Actions)
Loop - Actions
Set Comp[(Integer A)] = (Picked player)
Pits
Events
Unit - A unit enters Player1 Pit <gen>
Unit - A unit enters Player2 Pit <gen>
Unit - A unit enters Player3 Pit <gen>
Unit - A unit enters Player4 Pit <gen>
Conditions
(Number of units in (Units in Player1 Pit <gen> owned by Comp[(Integer A)])) Equal to 1
(Number of units in (Units in Player2 Pit <gen> owned by Comp[(Integer A)])) Equal to 1
(Number of units in (Units in Player3 Pit <gen> owned by Comp[(Integer A)])) Equal to 1
(Number of units in (Units in Player4 Pit <gen> owned by Comp[(Integer A)])) Equal to 1
Actions
Game - Display to (All players) for 5.00 seconds the text: FIGHT STARTED
Unit Group - Pick every unit in (Units owned by red) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Player1 Spawn <gen>)
Unit Group - Pick every unit in (Units owned by blue) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Player2 Spawn <gen>)
Unit Group - Pick every unit in (Units owned by teal) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Player3 Spawn <gen>)
Unit Group - Pick every unit in (Units owned by purp) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Player4 Spawn <gen>)
end
Events
Unit - A unit Dies
Conditions
Actions
Player - Add 1 to Player 8 (Pink) Current gold
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Arena <gen>)) Less than 2
Then - Actions
Unit Group - Pick every unit in (Units in Arena <gen>) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to Player 5 (Yellow)
Then - Actions
Player - Add 1 to Player 1 (Red) Current lumber
Unit - Kill (Picked unit)
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Player 1 ...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to Player 6 (Orange)
Then - Actions
Player - Add 1 to Player 2 (Blue) Current lumber
Unit - Kill (Picked unit)
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Player 2 ...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to Player 7 (Green)
Then - Actions
Player - Add 1 to Player 3 (Teal) Current lumber
Unit - Kill (Picked unit)
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Player 3 ...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to Player 8 (Pink)
Then - Actions
Player - Add 1 to Player 4 (Purple) Current lumber
Unit - Kill (Picked unit)
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Player 4 ...
Else - Actions
Else - Actions
Winner
Events
Player - Player 8 (Pink)'s Current gold becomes Equal to 7.00
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player 2 (Blue) Current lumber) Greater than or equal to (Player 4 (Purple) Current lumber)) and ((Player 2 (Blue) Current lumber) Greater than (Player 1 (Red) Current lumber))) and (((Player 2 (Blue) Current lumber) Greater than or equal to (Player 3 (Teal) Current lumber)) and ((Player 2 (Blue) Current lumber) Greater than or equal to (Player 2 (Blue) Current lumber)))
Then - Actions
Game - Display to (All players) the text: PLAYER 2 IS A WINNE...
Wait 5.00 seconds
Game - Victory Player 2 (Blue) (Skip dialogs, Skip scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player 3 (Teal) Current lumber) Greater than or equal to (Player 4 (Purple) Current lumber)) and ((Player 3 (Teal) Current lumber) Greater than (Player 1 (Red) Current lumber))) and (((Player 3 (Teal) Current lumber) Greater than or equal to (Player 3 (Teal) Current lumber)) and ((Player 3 (Teal) Current lumber) Greater than or equal to (Player 2 (Blue) Current lumber)))
Then - Actions
Game - Display to (All players) the text: PLAYER 3 IS A WINNE...
Wait 5.00 seconds
Game - Victory Player 3 (Teal) (Skip dialogs, Skip scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player 4 (Purple) Current lumber) Greater than or equal to (Player 4 (Purple) Current lumber)) and ((Player 4 (Purple) Current lumber) Greater than (Player 1 (Red) Current lumber))) and (((Player 4 (Purple) Current lumber) Greater than or equal to (Player 3 (Teal) Current lumber)) and ((Player 4 (Purple) Current lumber) Greater than or equal to (Player 2 (Blue) Current lumber)))
Then - Actions
Game - Display to (All players) the text: PLAYER 4 IS A WINNE...
Wait 5.00 seconds
Game - Victory Player 4 (Purple) (Skip dialogs, Skip scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player 1 (Red) Current lumber) Greater than or equal to (Player 4 (Purple) Current lumber)) and ((Player 1 (Red) Current lumber) Greater than (Player 1 (Red) Current lumber))) and (((Player 1 (Red) Current lumber) Greater than or equal to (Player 3 (Teal) Current lumber)) and ((Player 1 (Red) Current lumber) Greater than or equal to (Player 2 (Blue) Current lumber)))
Then - Actions
Game - Display to (All players) the text: PLAYER 1 IS A WINNE...
Wait 5.00 seconds
Game - Victory Player 1 (Red) (Skip dialogs, Skip scores)
Else - Actions
Choose
Events
Player - Player 1 (Red) types a chat message containing -Choose as An exact match
Conditions
(Player 1 (Red) Food used) Equal to 0
Actions
Unit - Create 1 RedPick for Player 5 (Yellow) at (Center of Player1 Pit <gen>) facing Default building facing degrees
Gull
Events
Player - Player 1 (Red) types a chat message containing -gull as An exact match
Well what i had in mind was to require all possible units would be in their respective pits before starting, not just one of the pits being filled.
This way every single "pit" would have a unit inside (except for the one that correspond the the computer player w/o a user ally)
It's because your Comp trigger is wrong, so the reference in Comp[(IntegerA)] is also wrong.
This is your Comp trigger:
Comp
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players matching ((((((Picked player) is an ally of teal) Equal to True) or (((Picked player) is an ally of purp) Equal to True)) or ((((Picked player) is an ally of red) Equal to True) or (((Picked player) is an ally of blue) Equal to True))) and (((Pic and do (Actions)
Loop - Actions
Set Comp[(Player number of (Picked player))] = (Picked player)
When you use ''Pick every player in (All players matching'', you need "Matching player" to perform the "match", not "Picked player". Picked player is after you pick the players.
So, it should be:
Player Group - Pick every player in (All players matching ((((((Matching player) is an ally of teal) Equal to True) or (((Matching player) is an ally of purp) Equal to True)) or ((((Matching player) is an ally of red) Equal to True) or (((Matching player) is an ally of blue) Equal to True))) and (((Mat and do (Actions)
I tried doing what you said, but it wouldlt allow it. there were some errors.
Mainly the errors were where i set Point1 as players 2, 3, and 4 spawns
Pits alt
Events
Unit - A unit enters Player1 Pit <gen>
Unit - A unit enters Player2 Pit <gen>
Unit - A unit enters Player3 Pit <gen>
Unit - A unit enters Player4 Pit <gen>
Conditions
Actions
Game - Display to (All players) for 5.00 seconds the text: Unit Chosen
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Set unit_group = (Units in Pits[(Integer B)] owned by Comp[(Integer A)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in unit_group) Equal to 1
Then - Actions
Set Point1 = Player1 Spawn <gen>
Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Point1)
Custom script: call RemoveLocation (udg_Point1)
Set Point1 = Player2 Spawn <gen>
Unit Group - Pick every unit in (Units owned by Player 6 (Orange)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Point1)
Custom script: call RemoveLocation (udg_Point1)
Set Point1 = Player3 Spawn <gen>
Unit Group - Pick every unit in (Units owned by Player 7 (Green)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Point1)
Custom script: call RemoveLocation (udg_Point1)
Set Point1 = Player4 Spawn <gen>
Unit Group - Pick every unit in (Units owned by Player 8 (Pink)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Point1)
Custom script: call RemoveLocation (udg_Point1)
Else - Actions
Custom script: call DestroyGroup (udg_unit_group)
Also before trying to fix the leaks by using this variable, when i i tested this map with some friends, we were all able to choose our units, and they spawned in their respective "pit" regions but nothing happend after that, the units did not enter the arena
if you want me to link the (current) map i will
I now allows me to enable the trigger again, but it still send the units to their respective Point1s, which leads me to believe the conditions are the problem. it'd probably be less confusing if i knew how to work the actions that use integer A/B. or what they did for that matter xD
it STILL doesn't want to work, although even though i haven't been testing it with a full 4 people i still don't understand why it doesn't work. Could It Be one of the other triggers?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.