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!
Yes, it requires Trackables. They are a somewhat 'incomplete' function specific to JASS only.
They allow you to create a model on the map, and then you can detect when a player hovers over them or clicks them. The drawbacks of trackables:
There is no function to destroy trackables. This is the biggest drawback, since it means that you can't
create full-fledged systems that would require tons of trackables. Once you create one, it will stay there in memory.
You can't retrieve the player who clicked the trackable. Not natively anyway. Using GetLocalPlayer(), such
as in my system that bajaist linked, you can detect the player who clicked it. It means you'll end up generating a trackable
for each player, but it is mostly useless if you don't know which player clicked it.
You can't create them on screen, and they must use a model. Sadly, they'll be created on the terrain, not the screen,
so you can't really detect where the cursor is. That is why most inventory/talent tree systems are full-screen. It allows you to
make a fixed set of trackables on one part of the screen, so you can detect where the cursor is (as long as the camera stays in that position).
There are some examples in the spells section which implement trackables using GUI, but they still resort to custom scripts and mostly JASS. Perhaps I should make GUI-friendly extensions for my system?
Memory is overall pretty cheap, but it is indeed a lot. In 256x256, if you had one trackable per tile, you'd end up with 65536 trackables. And even that is pretty low in terms of precision.
If you wanted better precision, you would have 4 per tile, and that would be 262144 trackables.
Also, even when trackables use an untextured plane model, they will still take up performance. More trackables on screen == lower-fps. In general trackables aren't very practical except in fixed-camera locations, or in small maps. (... or when they are used for what Blizzard intended them to be used for ...)
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.