• 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] dunno how to do this one?

Status
Not open for further replies.
Level 11
Joined
Apr 5, 2009
Messages
728
i am making a hero arena map,it took me 4 months to half complete it.

all i need for my map to be finished is this a victory trigger.

the trigger is:when player 1 or player,3,4,5 does 85 kills,he wins the game. .how can i do that?need help:D. . and tell me what type is the variable needed
if there is a variable. . :thumbs_up:
 
Level 2
Joined
Jun 24, 2008
Messages
15
Try making an integer variable for each player, and when your hero gets a kill Set Integer to (Integer + 1)
Make a trigger that checks every time a hero dies If Integer = 85, using if / then / else
Integer comparison If Integer equal to 85, then (victory actions).
 
Level 6
Joined
Apr 29, 2008
Messages
94
You need a trigger that checks every ~1 second.

But first you need a variable(integer) that counts killd units by player like

Unit dies

Owner of killing unit is equal to <some player>

Set KillCounter = KillCounter + 1

Second trigger

Every 1 second

KillCounter is greater or equal to 85

Defeat player or something..



Whats the point in another 'every sec trigger' if he can just add a check action every time the kill integer raises?
 
Level 11
Joined
Feb 14, 2009
Messages
884
ScoreOne/Three/Four/Five are Real variables. The event is called "Game - Value of Real variable"

  • PlayerOne Victory
    • Events
      • Game - ScoreOne becomes Equal to 85.00
    • Conditions
    • Actions
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
      • Game - Defeat Player 3 (Teal) with the message: Defeat!
      • Game - Defeat Player 4 (Purple) with the message: Defeat!
      • Game - Defeat Player 5 (Yellow) with the message: Defeat!
You will need one of this for every player.

  • PlayerOne Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (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 ScoreOne = (ScoreOne + 1.00)
And this trigger manages the kills. Again, you need one for each player.
 
Level 11
Joined
Apr 5, 2009
Messages
728
  • Untitled Trigger 002
    • Events
      • Map initialization
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set KILLS[(Player number of (Owner of (Killing unit)))] = KILLS[(Player number of (Owner of (Killing unit)))]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KILLS[(Player number of (Owner of (Killing unit)))] Equal to 85
        • Then - Actions
          • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
        • Else - Actions
          • Do nothing
like this?
 
Level 11
Joined
Feb 14, 2009
Messages
884
No. This trigger won't work. Try this one:

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Triggering unit) is a Hero Equal to True
  • Actions
    • Set Kills(Player number of (Owner of (Killing Unit)) = Kills(Player number of (Owner of (Killing unit) +1
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Kills(Player number of (Owner of (Killing unit)) Equal to 85
    • Then
      • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
      • Set LosingGroup = Player Group - Pick every player in (All enemies of (Owner of (Killing unit))) and do (Game - Defeat (Picked player) with the message: PWND!)
      • Custom script: call DestroyForce(udg_LosingGroup)
    • Else
      • Do nothing
 
Level 11
Joined
Feb 14, 2009
Messages
884
True. Then, he can use AND in the conditions. Like this:

  • (Triggering unit) is A Hero Equal to True And (Owner of (Killing unit) Not Equal to (Owner of (Triggering unit))
How about that?
 
Status
Not open for further replies.
Top