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

Killing Trigger ?? Needs Help.. :O

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
What you need is Integer variable with array enabled - in which the array is filled with Player's Number.

  • Player Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Killing unit)) Not equal to Neutral Hostile
    • Actions
      • Set PlayerKiller = (Owner of (Killing unit))
      • Set PlayerNumber = (Player number of PlayerKiller)
      • Set PlayerKill[PlayerNumber] = (PlayerKill[PlayerNumber] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[PlayerNumber] Equal to 10
        • Then - Actions
          • Game - Victory PlayerKiller (Show dialogs, Show scores)
        • Else - Actions
PlayerKiller - Player Variable
PlayerNumber - Integer Variable
PlayerKill - Integer Variable (array)
 
Level 4
Joined
May 30, 2012
Messages
40
It works !
and 1 more question ..

This is my trigger ...

  • Time - Elapsed game time is 5.00 seconds
  • (Player 1 (Red) slot status) Equal to playing
  • Unit - Create 1 _ for player 1 (Red) at................
i want create a trigger to move player's camera to _ (hero)?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Hero Spawn
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Player 1 (Red) slot status) Equal to Is playing
    • Actions
      • Set TempLoc = (Center of (Playable map area))
      • Unit - Create 1 Blood Mage for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Camera - Pan camera for Player 1 (Red) to TempLoc over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempLoc)
TempLoc - Point Variable

You will be needing this, to clear "leaks".
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You're gonna need a location to spawn that unit first, that's why it is determined by that variable.
As I've shown you, this is how you would move the camera to the spawn location;
  • Camera - Pan camera for Player 1 (Red) to TempLoc over 0.00 seconds
Where "TempLoc" is for you to determine where you would want the unit to be spawned.
If let's say random, well, random it is.
No matter where does the location takes you, the camera will always move to the location, don't worry.
 
Status
Not open for further replies.
Top