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

[Trigger] Victory

Status
Not open for further replies.
Level 1
Joined
Aug 9, 2008
Messages
4
I need help on how to make victory in a game from a certain amount of kills that displays off a Multiboard or Leaderboard. Can anyone help me?
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Well, you need to make a "real" variable. I'll call it CountKills and lets say the creatures you need to kill are ghouls. Now we need the following trigger:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Ghoul
  • Actions
    • Set CountKills = (CountKills + 1.00)
Now that we have that we need a trigger that will make a player victorious when he kills 50 ghouls.
  • Events
    • Game - a becomes Greater than or equal to 50.00
  • Conditions
  • Actions
    • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Now, if you want to have a separate kill rate for every player you will need to make as many variables as there are players and add a condition which states who is the owner of the killing unit.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Merge those triggers...

  • Events
    • Unit - a unit dies
  • Conditions
    • Unit type of (dying unit) equal to ghoul
  • Actions
    • Set Killcount[Player number of Owner of Killing unit] = Killcount[Player number of Owner of Killing unit] + 1 // this is an integer var
    • If Killcount[Player number of Owner of Killing unit] larger than or equal to 50 do (multiple actions):
      • Loop - actions
        • Victory Owner of (killing unit) with the message: "You own"
 
Status
Not open for further replies.
Top