• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] how to end my map ???

Status
Not open for further replies.
Level 1
Joined
Apr 14, 2011
Messages
5
Is there any trigger for end my map?? (after 1 group 50 kill)
and can you show group kill in my multibourd??
Its my multibourd trigger...

  • Create Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Player_Count = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Multiboard - Create a multiboard with 3 columns and (1 + Player_Count) rows, titled Tutorial Arena
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Player
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Kills
      • -------- Now set the fields for the first row, AND our player rows. --------
      • For each (Integer A) from 1 to (1 + Player_Count), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 12.25% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 2.50% of the total screen width
      • -------- Quickly change the top row to hide that icon.... --------
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
      • -------- DEFINE PLAYERS ON THE BOARD --------
      • -------- List defines the spots on the board, the rows. Starts at second row. --------
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • -------- Mutiboard_Spots keeps track of which row a player has been put on. It is an integer array. --------
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\CommandButtons\BTNFootman.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row List to 0
          • Set List = (List + 1)
      • Multiboard - Show (Last created multiboard)
and

  • Tally Score
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Killing unit)) controller) Equal to User
      • ((Triggering unit) is an illusion) Equal to False
      • (Infernal is A structure) Equal to False
      • (Pit Lord is A structure) Equal to False
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set Kill_Count[(Player number of (Owner of (Killing unit)))] = (Kill_Count[(Player number of (Owner of (Killing unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (String(Kill_Count[(Player number of (Owner of (Killing unit)))]))
  • Define Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Colors[1] = |c00ff0000
      • Set Player_Colors[2] = |c000000ff
      • Set Player_Colors[3] = |c0000ffff
      • Set Player_Colors[4] = |c00800080
      • Set Player_Colors[5] = |c00ffff00
      • Set Player_Colors[6] = |c00ff8000
      • Set Player_Colors[7] = |c0000ff00
      • Set Player_Colors[8] = |c00ff00ff
:vw_wtf:
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

I hope you think of something like this:

1) Well, you can make, if a player reaches at first the 50 kills he won. Put this at the end of "Tally Score":
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Kill_Count[(Player number of (Owner of (Triggering unit)))] Equal to 50
    • Then - Actions
      • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
    • Else - Actions
2) But now you say if one GROUP reaches first the kills. Well then you can count all Kill_Counts together like this:

1] Add all players that are in one group into a unit group. (For example the first 4 players are in one group)
  • Kill
    • Events
    • Conditions
    • Actions
      • Set TempInteger = (Kill_Count[1] + (Kill_Count[2] + (Kill_Count[3] + Kill_Count[4])))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInteger Equal to 50
        • Then - Actions
          • Player Group - Pick every player in (PlayerGroup_1) and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions
Edit: Well well Maker was faster^^
 
Status
Not open for further replies.
Top