• 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] Req: Unit counter

Status
Not open for further replies.
Level 9
Joined
May 30, 2008
Messages
430
i need something like unit counter to looks like
total units
======

etc. total units to be all units on the map and a trigger if units go more than a some number to kill all new units.
I am still reading threads with leaderboards information but is alot complicated for me to cr8 this will be my first tommorow i will try to cr8 one but i am sure will not be ok :ugly:
 
Level 2
Joined
May 25, 2006
Messages
13
lol i think its kinda simple


A loop tigger that will add all players to the leader board with there names and units on map. niftfy huh ^^
  • leader make
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Units on Map
      • Set leader = (Last created leaderboard)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Player((Integer A))) to leader with label (Name of (Player((Integer A)))) and value stats[(Integer A)]
      • Leaderboard - Add Player 11 (Dark Green) to leader with label Total Units and value (Number of units in (Units in (Playable map area)))
This is a simple loop that will updadte your units on the map every half a second. it applys to players 1-10.
  • leader update
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set stats[(Integer A)] = (Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is alive) Equal to True)))
          • Leaderboard - Change the value for (Player((Integer A))) in leader to stats[(Integer A)]
      • Leaderboard - Change the value for Player 11 (Dark Green) in leader to (Number of units in (Units in (Playable map area) matching (((Matching unit) is alive) Equal to True)))
This will kill any units that come after the limit is reached (you can change the 10 to waht ever number youd like ^^)
  • kill new units
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (Number of units in (Units in (Playable map area) matching (((Matching unit) is alive) Equal to True))) Greater than 10
    • Actions
      • Unit - Kill (Last created unit)
hope i helped ^^
 

Attachments

  • Your Leader and Kill System.w3x
    11.1 KB · Views: 45
Last edited:
Level 9
Joined
May 30, 2008
Messages
430
there is big problem with kill new unit trigger the problem is that units are spown in region but the number of units is not 1 it is between 2-7 .I try other variants for this trigger but in 2 hours time no find any way to make it without memory leaks or somthing. and these variables is new for me i am still learn them :)
 
Status
Not open for further replies.
Top