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!
I need to make a quest where you have to kill 10 units and i want to have the "remaining units" in the top corner, like in rexxar campaign where you kill storm lizards. How do i do that please? thanks
You will need:
- A trigger that creates a leaderboard with "Remaining Units" as the player
- A trigger to count when a specified unit dies, reducing the leaderboard player's number by 1, and checks if the units remaining = 0
Ex.
questldbcreate
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Set i = 10
Leaderboard - Create a leaderboard for (All players) titled Quest
Leaderboard - Add Player 24 (Peanut) to (Last created leaderboard) with label Units Remaining and value i
questunitcount
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Footman
Actions
Set i = (i - 1)
Leaderboard - Change the value for Player 24 (Peanut) in (Last created leaderboard) to i
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
i Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
(Do actions)
Else - Actions
Change the stuff you want for your map. You can also read up more on leaderboards here.
You will need:
- A trigger that creates a leaderboard with "Remaining Units" as the player
- A trigger to count when a specified unit dies, reducing the leaderboard player's number by 1, and checks if the units remaining = 0
Ex.
questldbcreate
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Set i = 10
Leaderboard - Create a leaderboard for (All players) titled Quest
Leaderboard - Add Player 24 (Peanut) to (Last created leaderboard) with label Units Remaining and value i
questunitcount
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Footman
Actions
Set i = (i - 1)
Leaderboard - Change the value for Player 24 (Peanut) in (Last created leaderboard) to i
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
i Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
(Do actions)
Else - Actions
Change the stuff you want for your map. You can also read up more on leaderboards here.
thank you so much my man, exactly what i needed. Also 2 things my WC3 is in diffirent language so when i read 24 (peanut) i laughed so hard... why is a color called peanut ffs xd also i was like player24? dafuq then i remembered we live in gold era of 24 player update but yea thanks so much <3 +rep
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.