• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

easy help + rep how make player group etc

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2010
Messages
312
Something along the lines of this..
  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Team_1 = (All allies of Player 1 (Red))
      • Set Team_2 = (All enemies of Player 1 (Red))
      • Player Group - Pick every player in Team_1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Set Team_1_Kills = (Team_1_Kills + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Team_1_Kills Equal to 10
                • Then - Actions
                  • Player Group - Pick every player in Team_1 and do (Actions)
                    • Loop - Actions
                      • Game - Victory (Picked player) (Show dialogs, Show scores)
                  • Custom script: call DestroyForce(udg_Team_1)
                  • Player Group - Pick every player in Team_2 and do (Actions)
                    • Loop - Actions
                      • Game - Defeat (Picked player) with the message: Defeat!
                  • Custom script: call DestroyForce(udg_Team_2)
                • Else - Actions
            • Else - Actions
      • Custom script: call DestroyForce(udg_Team_1)
      • Player Group - Pick every player in Team_2 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Set Team_2_Kills = (Team_2_Kills + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Team_2_Kills Equal to 10
                • Then - Actions
                  • Player Group - Pick every player in Team_2 and do (Actions)
                    • Loop - Actions
                      • Game - Victory (Picked player) (Show dialogs, Show scores)
                  • Custom script: call DestroyForce(udg_Team_2)
                  • Player Group - Pick every player in Team_1 and do (Actions)
                    • Loop - Actions
                      • Game - Defeat (Picked player) with the message: Defeat!
                  • Custom script: call DestroyForce(udg_Team_1)
                • Else - Actions
            • Else - Actions
      • Custom script: call DestroyForce(udg_Team_2)
 
use 2 triggers for this. one at time elapsed 0.00 and create the team 1 and team 2 player groups. do not destroy them.
in the second trigger use a unit dies.
set killing unit to a variable. then detect owner of killing unit using the variable. then check to see if player is in player group. then increase kills counter.

ur trigger wont work until u make these changes.
 
It can be done in a even simpler way without player groups.

  • tendeadpudges
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
    • Actions
      • Set Kill_Count[1] = Kill_Count[1] + 1
And copy and paste and make a team 2 version.
  • restart round
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
      • Kill_Count[1] Equal to 10
    • Actions
      • Trigger - Run Victory/Defeat <gen> (checking conditions)
      • Hero - Set AllPudges Hero-level to 1, Hide level-up graphics
      • Hero - Set AllPudges experience to 0, Hide level-up graphics
This isn't all of it but its close. I don't want to be working on this for you if you are asking everyone else to do it. PM if you want me to finish this or I will work on my own map. I see another person asking the same question. Pretty sure you asked him to work on this too.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
@Legal_Ease, if the players are divided so that T1 = P1-P5 and T2 = P6-P10, then you could just use "Player number of triggering player < x".

if pnumber < 6 then
--set index = 1
else
--set index = 2
endif
set kills[index] = kills[index] + 1
if kills[index] >= y then
--victory

So instead of three triggers, you could use only one.

Filter out ally kills, "owner of triggering unit is an enemy of killing unit".
 
@Legal_Ease, if the players are divided so that T1 = P1-P5 and T2 = P6-P10, then you could just use "Player number of triggering player < x".

if pnumber < 6 then
--set index = 1
else
--set index = 2
endif
set kills[index] = kills[index] + 1
if kills[index] >= y then
--victory

So instead of three triggers, you could use only one.

Filter out ally kills, "owner of triggering unit is an enemy of killing unit".

Ya ya, I know. I wrote that in 2 minutes. I was looking for the condition "is an enemy of Player 1 (red)" instead of just listing out the players but I wasn't that intent on finding it. I sorta have the players backwards above too. Part of the problem is that most of the triggers in this game are already written by someone else and the system needs to work with all of the triggers. So my point was just that the rounds system is easy peasy but its the integration into the game that requires work. Work that I'm not willing to do if it turns out that someone else is already working on. No point in having two people write two different systems for the same thing.
 
Well, its nice to know if someone is doing it instead of finding out on your own.

true that way u know. but it doesnt bother me. there is a ton of times me and spartipilo make the same thing. i do it to see any better coding i can get and because its fun making things when i have time lol.

@TO
He's right but its the thought that counts I guess :)
the thought is nice its just misleading. i thought i should correct him. i think he also gives rep to anyone that helps not just one person which i believe is the right thing to do.

@TO
the max rep u can give atm is 1. as u gain rep u can give more.
 
Status
Not open for further replies.
Top