• 🏆 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!

[General] Help with GAME MODES

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
Hi I need non-ending map game-modes that can be switched throught voting or typing and need helping achieving the following:

My plan is to have 2 teams and use 1 unit per player and set team 1 = allies os computer player 1, and team 2 = allies of computer player 2

[HIGH PRIORITY]
Last Team Standing - I need a last-team standing mode where when there are no units from one team allive the other team wins the round (as I stated before the map should't come to an total end, just matches over matches) A match should have 3 rounds and the team with most rounds won wins the match.

[MID PRIORITY]

Capture the Flag - an common capture the flag mode

Kill The King - A random player is picket from each team and set as king, the opposite's team objective is to kill the other king, the team which kills the opposite king first wins the round.

[LOW PRIORITY]

Free-for-all (Last Man Standing) - All alliances are broken and the last player alive is the winner of the round

Arena - Two teams are thrown in an arena and should survive incoming creep waves as well as the opposite team trying to kill them.

Arena (co-op) - All players are allied and should try to survive incoming creep waves


-----ALL HELP IS MUCH APPRECIATED, THANKS IN ADVICE!------------
 
Level 14
Joined
Nov 30, 2013
Messages
926
For Last Team Standing, you can create an integer-array variable which counts the number of players per team. When one of the team's player died, subtract the variable by 1. Then you can create an If statement which team has the highest amount of player alive. (ex. Team 1 has 2 players alive while Team 2 has 0 players alive. Therefore, Team 1 wins.)
For it's scoring, create an integer-variable in array of which team that increases after every rounds ends. Then when the match ends, they'll need a If statement to measure which team has the highest round wins.

For Capture the Flag, it's kinda simple. Just make a flag a droppable item which when someone died while holding the flag, it'll drop. Then a region which finds an unit who's holding their opponent's flag.
 
Level 14
Joined
Nov 30, 2013
Messages
926
Could you make an example please?

Last Team Standing:
Code:
//Initialization
TeamPlayer[0] = *(Get number of player at (Team 1))*
TeamPlayer[1] = *(Get number of player at (Team 2))*
RoundTeam[0 & 1] = 0

//TeamPlayer_Subtraction
**A unit died**

If ( (Dying Unit) is an ally of (Team 1) ) then
   TeamPlayer[0] = TeamPlayer[0] - 1
Elseif ( (Dying Unit) is an ally of (Team 2) ) then
   TeamPlayer[1] = TeamPlayer[1] - 1
Endif

//Round_End
**A timer expires**

If (TeamPlayer[0] > TeamPlayer[1]) then
   RoundTeam[0] = RoundTeam[0] + 1
   **Team 1 wins the round**
Elseif (TeamPlayer[1] > TeamPlayer[0]) then
   RoundTeam[1] = RoundTeam[1] + 1
   **Team 2 wins the round**
Endif

//Match_End
**After finishing 3rd Round**
If (RoundTeam[0] > RoundTeam[1]) then
   **Team 1 wins the match**
Elseif (RoundTeam[1] > RoundTeam[0]) then
   **Team 2 wins the round**
Endif

Capture the Flag:
Code:
//Team Region
**Team 1 unit enters their region with the flag**

If ( (Entering Unit) has a item of (Team 2's Flag) ) then
   *Team 1 wins*
EndIf

**Team 2 unit enters their region with the flag**

If ( (Entering Unit) has a item of (Team 1's Flag) ) then
   *Team 2 wins*
EndIf

It's not really Jass and I can't make a GUI trigger of these.
Can't use editors (even for JNGP) because I'm reinstalling my game.
You may convert these examples into GUI if you want to.
 
Level 11
Joined
Oct 9, 2015
Messages
721
Trigger1
  • Untitled Trigger 009
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Create a timer window for die with title tempo
      • Countdown Timer - Change the title of (Last created timer window) to tempo
      • Countdown Timer - Show (Last created timer window)
      • Countdown Timer - Start die as a One-shot timer that will expire in 120.00 seconds
      • Set TempPlayer[0] = (Number of players in (All allies of Player 11 (Dark Green)))
      • Set TempPlayer[1] = (Number of players in (All allies of Player 12 (Brown)))
Trigger2
  • Untitled Trigger 011
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Human
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 11 (Dark Green)) Equal to True
        • Then - Actions
          • Set TempPlayer[0] = (TempPlayer[0] - 1)
          • Game - Display to (All players) the text: tempplayer 0 -1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 12 (Brown)) Equal to True
        • Then - Actions
          • Set TempPlayer[1] = (TempPlayer[1] - 1)
        • Else - Actions
Trigger3
  • Untitled Trigger 012
    • Events
      • Time - die expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempPlayer[0] Greater than TempPlayer[1]
        • Then - Actions
          • Set RoundTeam[0] = (RoundTeam[0] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempPlayer[1] Greater than TempPlayer[0]
        • Then - Actions
          • Set RoundTeam[1] = (RoundTeam[1] + 1)
        • Else - Actions
Trigger4
  • Untitled Trigger 013
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RoundTeam[0] Greater than RoundTeam[1]
        • Then - Actions
          • Game - Display to (All players) the text: Time 1 Vence
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RoundTeam[1] Greater than RoundTeam[0]
        • Then - Actions
          • Game - Display to (All players) the text: Time 2 Vence
        • Else - Actions
Somehow it isn't really working. Did I did something wrong ?
 
Level 14
Joined
Nov 30, 2013
Messages
926
  • Make sure that a Computer Player (Which doesn't have do to with units at Trigger2) must not be picked in *Numbers of (Player X)*.
    You can simply fix this by doing like this.
    • Set TempPlayer[X] = ((Numbers of player in (All allies of Computer Player)) - 1)
  • In every start of the Trigger #3, add this variable to calculate what round are you now.
    • Set Round = (Round + 1)
  • The Trigger #4's Event should suppose to be empty. I suggest you should use the "Trigger - Run (Trigger4)" action at the Trigger #3 in the end of it.
    Then add this If statement with this boolean in the Trigger #4:
    • If (Rounds is equal or greater than 3) then
    with the inside of it are the other If statement. (Those "If RoundTeam[X] is greater than RoundTeam[X]")
 
Level 11
Joined
Oct 9, 2015
Messages
721
Apparently LAST TEAM STANDING is working fine, thank you very much! Care to check the triggers I've made? I'll begin making CAPTURE THE FLAG then KILL THE KING!

  • entering game mode
    • Events
      • Player - Player 1 (Red) types a chat message containing -lts as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Run creating timer and setting teams <gen> (ignoring conditions)
      • Trigger - Turn on points in round <gen>
      • Trigger - Turn on end round <gen>
      • Trigger - Turn on end match <gen>
      • Set LTS = True
      • Set Rounds = (Rounds + 1.00)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Humano
            • Then - Actions
              • Set Loc1 = (Center of Centro <gen>)
              • Custom script: call RemoveLocation(udg_Loc1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 11 (Dark Green)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of entrada time 1 <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = 90.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 12 (Brown)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of entrada time 2 <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = -90.00
                • Else - Actions
            • Else - Actions
  • creating timer and setting teams
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Create a timer window for LTS TIMER with title Round 1
      • Countdown Timer - Show (Last created timer window)
      • Countdown Timer - Start LTS TIMER as a One-shot timer that will expire in 30.00 seconds
      • Set TempPlayer[0] = ((Number of players in (All allies of Player 11 (Dark Green))) - 1)
      • Set TempPlayer[1] = ((Number of players in (All allies of Player 12 (Brown))) - 1)
  • points in round
    • Events
      • Unit - A unit Dies
    • Conditions
      • LTS Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Humano
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 11 (Dark Green)) Equal to True
        • Then - Actions
          • Set TempPlayer[0] = (TempPlayer[0] - 1)
          • Game - Display to (All players controlled by a User player) the text: tempplayer 0 -1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 12 (Brown)) Equal to True
        • Then - Actions
          • Set TempPlayer[1] = (TempPlayer[1] - 1)
          • Game - Display to (All players controlled by a User player) the text: tempplayer 1 -1
        • Else - Actions
  • end round
    • Events
      • Time - LTS TIMER expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rounds Equal to 1.00
        • Then - Actions
          • Countdown Timer - Change the title of (Last created timer window) to Round 2
          • Countdown Timer - Start LTS TIMER as a One-shot timer that will expire in 30.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rounds Equal to 2.00
        • Then - Actions
          • Countdown Timer - Change the title of (Last created timer window) to Round 3
          • Countdown Timer - Start LTS TIMER as a One-shot timer that will expire in 30.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rounds Equal to 3.00
        • Then - Actions
          • Countdown Timer - Change the title of (Last created timer window) to Round 2
          • Countdown Timer - Start LTS TIMER as a One-shot timer that will expire in 30.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rounds Equal to 4.00
        • Then - Actions
          • Countdown Timer - Destroy (Last created timer window)
        • Else - Actions
      • Set Rounds = (Rounds + 1.00)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Humano
            • Then - Actions
              • Set Loc1 = (Center of Centro <gen>)
              • Custom script: call RemoveLocation(udg_Loc1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 11 (Dark Green)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of entrada time 1 <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = 90.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 12 (Brown)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of entrada time 2 <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = -90.00
                • Else - Actions
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempPlayer[0] Greater than TempPlayer[1]
        • Then - Actions
          • Set RoundTeam[0] = (RoundTeam[0] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempPlayer[1] Greater than TempPlayer[0]
        • Then - Actions
          • Set RoundTeam[1] = (RoundTeam[1] + 1)
        • Else - Actions
      • Set TempPlayer[0] = ((Number of players in (All allies of Player 11 (Dark Green))) - 1)
      • Set TempPlayer[1] = ((Number of players in (All allies of Player 12 (Brown))) - 1)
  • end match
    • Events
      • Game - Rounds becomes Equal to 4.00
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RoundTeam[0] Greater than RoundTeam[1]
        • Then - Actions
          • Game - Display to (All players controlled by a User player) the text: Team 1 Wins!
        • Else - Actions
          • Game - Display to (All players controlled by a User player) the text: Team 2 Wins!
      • Trigger - Turn on entering game mode <gen>
      • Trigger - Turn on saindo acampamento <gen>
      • Trigger - Turn off points in round <gen>
      • Trigger - Turn off end round <gen>
      • Trigger - Turn off (This trigger)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Humano
            • Then - Actions
              • Set Loc1 = (Center of Centro <gen>)
              • Custom script: call RemoveLocation(udg_Loc1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 11 (Dark Green)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of Tenda Time 1 <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = 90.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 12 (Brown)) Equal to True
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to (Center of Tenda Time 1 Copy <gen>), facing (Center of Centro <gen>)
                  • Set Angle[(Player number of (Owner of (Picked unit)))] = -90.00
                • Else - Actions
            • Else - Actions
      • Set Rounds = 0.00
      • Set RoundTeam[0] = 0
      • Set RoundTeam[1] = 0
      • Set LTS = False
 
Status
Not open for further replies.
Top