I see there are triggers to display how many minerals a player has, and potentially you could tie a trigger to every action that consumes minerals, but that seems like a very messy way of manually doing it. Anyone have any idea for displaying minerals earned from kills on a leaderboard?
Yup, what BasharTeg. In most (well, maybe not most, but some) maps, and ALL games, there is a single thread that runs every .5 seconds or so (actually faster in "real" games, but it isn't needed for something like this). This thread updates everything in the GUI, images, animations, pretty much anything on the screen. The speed this runs at you most likely know as the frame rate. Because in SC2 you cannot access that thread, you have to create your own.
So yeah, most of that was irrelevant to what you are doing, but it couldn't hurt. Follow his tutorial for details on the actual triggering.
I know how to display how many minerals a person has. What I want to track specifically is how many minerals they have earned from unit bounty total over the course of the game.
I see there are triggers to display how many minerals a player has, and potentially you could tie a trigger to every action that consumes minerals, but that seems like a very messy way of manually doing it. Anyone have any idea for displaying minerals earned from kills on a leaderboard?
Create a loop and update the minerals using that.
I made a tutorial that explains loops. Just skip down to the part entitled "Important Concepts."
Yup, what BasharTeg. In most (well, maybe not most, but some) maps, and ALL games, there is a single thread that runs every .5 seconds or so (actually faster in "real" games, but it isn't needed for something like this). This thread updates everything in the GUI, images, animations, pretty much anything on the screen. The speed this runs at you most likely know as the frame rate. Because in SC2 you cannot access that thread, you have to create your own.
So yeah, most of that was irrelevant to what you are doing, but it couldn't hurt. Follow his tutorial for details on the actual triggering.
Great to be back and part of the community again!
I know how to display how many minerals a person has. What I want to track specifically is how many minerals they have earned from unit bounty total over the course of the game.
Unit dies as event. Use a function to get their bounty. Add it to leaderboard.
Great to be back and part of the community again!
@TacoManStan: Go
That or just store the amount of total bounty in a separate variable and display that.