• 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.

Help Needed in Arena's Style

Status
Not open for further replies.
Level 3
Joined
Aug 31, 2008
Messages
22
Hi to everyone,
I'm here posting this thread because i've so heard good comments about this site and about this community too.

My problem is that i'm making an Arena's Style map, you know, like reach the kill limit to defeat your enemy team but since i'm kinda newbie in editing i can't do it.

So, would you PLEASE answer me writing down there a JASS trigger that just need to be pasted without any problem?

I've searched in all the internet for an answer and i didn't find it yet. Hope you guys will solve my problem :)

What i'm looking for is something like: The host decides the score limit at the beginning of the game, then the game starts and once one of the 2 teams, simply called Team 1 and Team 2 wins the game, it ends in victory for winners and in defeat for loosers.

I know you can give me a good answer so please be good with me :p
 
Level 8
Joined
May 27, 2007
Messages
170
Something along the lines of this:

  • Set Score Limit
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
    • Conditions
    • Actions
      • Set ScoreLimit = (Integer((Substring((Entered chat string), 2, 10))))
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
ScoreLimit is an integer variable

That's one of many ways to let Player 1 set the score limit at the beggining of the game. It is quite buggy but it allows greater choice, and it will do the job for now anyway. I would explain how and why but I'm too tired to explain things properly at the minute. I explained substrings and such to someone in the past so here is a link to that post since I am currently unaware of anyplace an explanation of substrings may be found:

http://www.hiveworkshop.com/forums/f98/kick-system-help-93096/#post763757

As for your second trigger:

  • Check for Victory
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - 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)
              • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
        • Then - Actions
          • Set TeamScores[2] = (TeamScores[1] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TeamScores[2] Equal to ScoreLimit
            • Then - Actions
              • For each (Integer A) from 7 to 12, do (Actions)
                • Loop - Actions
                  • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Owner of (Triggering unit)) Equal to Player 7 (Green)
                  • (Owner of (Triggering unit)) Equal to Player 8 (Pink)
                  • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
                  • (Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
                  • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
                  • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
            • Then - Actions
              • Set TeamScores[1] = (TeamScores[1] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TeamScores[1] Equal to ScoreLimit
                • Then - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
                • Else - Actions
            • Else - Actions
TeamScores[x] is an Integer Array variable

Every time a hero dies that trigger adds a point to the team containing the player who killed the hero. So the first part checks if the dying hero belonged to team 1, and if so adds a point to team 2's score. It then checks to see if that team has got as many points as Player 1 set as the score limit at the beggining and 'victories' them if they do.

Hope that helps :thumbs_up:
 
Status
Not open for further replies.
Top