Warcraft III resources & community, 2003–2006 · archived

Triggers-Show specific unit's life on LeaderBoard

6 posts
#1

Triggers-Show specific unit's life on LeaderBoard

Im making a map, kinda like hero siege, but i need a trigger(s) to make the unit's life appear on the leaderboard. i tried making it so that the gold = the unit's life, and in leaderboard, set the player's value to gold, kinda confusing, but then i couldnt find how to set the gold = the units life...
#2

hi

i dont think u can change gold to life with triggers

butt

E: Every 0.01 seconds
C: N/A
A: Set players current Gold to ((convert real to integer)[[[Units Life]]](owner of unit (set variable for unit of player))

---------------------------

E: Every 0.01 seconds
C:
A: Change Value For Player(1) on (leadboard) to (life of unit (set variable
#3
do you NEED gold for that? what about variable? with player 1 and 2 hero, it's done like this, just 2 triggers.


Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Wait 1.00 seconds
        Leaderboard - Create a leaderboard for (All players) titled Health
        For each (Integer A) from 1 to 2, do (Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label HP:  and value health[(Integer A)])


constant
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (If (((Picked unit) is A Hero) Equal to True) then do (Set health[(Player number of (Owner of (Picked unit)))] = (Integer((Life of (Picked unit))))) else do (Do nothing))
        For each (Integer A) from 1 to 2, do (Leaderboard - Change the value for (Player((Integer A))) in (Last created leaderboard) to health[(Integer A)])


sorry if this doesnt match your need, I don't know what's your "specific" unit health, and I don't know how many players, change it around to match your need.
#4
Check it if you go to the tutorials section on this web site there is a tutorial which actaully tells you bit by bit (with pictures!! :) ) how to make life and mana show up on a leader board!! and using icons as well to represnet them how cool is that :D
#5
well, i need something more like haloboycs

theres 7 user players, and 3 computers, each have one hero, and 1 of the comps is the unit that musnt die, lets say the "Specific" unit is a footman. I need to view the footman's life on the leaderboard, i already got a leaderboard with kills, can i have 2?

and you said i need variables? what should the variables be? i suck at variables

and yeah, ill check the tuturials
#6
NoobMagwell, i need something more like haloboycs

theres 7 user players, and 3 computers, each have one hero, and 1 of the comps is the unit that musnt die, lets say the "Specific" unit is a footman. I need to view the footman's life on the leaderboard, i already got a leaderboard with kills, can i have 2?

and you said i need variables? what should the variables be? i suck at variables

and yeah, ill check the tuturials


If you need two leaderboards, i suggest converting to a multiboard, on a multiboard you can display as many things as you want, but they are a bit more complex to make, although the basics are the same. I'd recommend you to look for a tutorial on multiboards, there's many of them around.