| 10-24-2003, 03:22 PM | #1 |
Have you guyes ever tried using the variable 'trackable' before? I did a couple of experiments with it, and found out that it's an object placed somewhere on the map, which can start triggers when the mouse either clicks it, or is moved on top of it. Too bad blizzard never finished their work, so you can't destroy a trackable again, nor move it. You can, however access the Triggering Trackable using GetTriggeringTrackable(). I can't find any real use of this except for making a really fancy hero selection system. I've attached a map so you can see what I mean. |
| 10-24-2003, 03:40 PM | #2 |
I've noticed that type but had no ideas what it means! Thanks. P.S. Setting trackable to null may help destroyng it? |
| 10-24-2003, 03:47 PM | #3 |
Setting it to null will only make variable null, not destroy the trackable. I can't believe blizzard couldn't make up a better name for that variable. |
| 10-24-2003, 03:49 PM | #4 |
Omg!! It is just brilliant :D I love it. You could create some really neat non-warcraftish games with this. I always thought trackable was some kind of dummies which units could attack and "Hit" :). EDIT: Came to think of something. |
| 10-24-2003, 03:57 PM | #5 |
Great! I could use this for my inventory... Although I stopped working on it and will never continue. |
| 10-24-2003, 04:09 PM | #6 |
I came to think of something too! I'll make a function for the Jass Vault that will register ANY mouse click. This could be VERY useful for mods like the FPSMod (maybe including FPSMod). |
| 10-24-2003, 06:13 PM | #7 |
... Another suggestion how to destroy trackables :) We can declare trackables as local variables inside trigger. When executed, trigger's action creates trackable (data can be read from global variables because code-type such trigger actions doesn't allow to transfer arguments within them) and then waits for condition in loop! Successfull condition check means trackable to be destroyed so function returns. Trackable as local variable will be destroyed. There can be another problem which is well known memory leaks :) What do you think about this idea? |
| 10-24-2003, 08:35 PM | #8 |
Seems like you don't really know how to program in jass :( A Trackable can only be fully destroyed by using a function like DestroyTrackable. Such a function does not exist. Therefor a trackable can never be fully destroyed, unless Blizzard creates such a function in a patch. Also, the wait idea doesn't work, because the trackable fires an event, not a condition. Good thing someone finally figured this out though :) |
| 10-24-2003, 08:38 PM | #9 | |
Quote:
it won't work at all... when you register a new game object, it becomes independent from any vars referring to it. When a local var is destroyed, it has no effect to the object it refers to... |
| 10-24-2003, 09:42 PM | #10 |
2 jmoritz: Okay, you may think I'm JASS lamer or someone else... You can think of me everything, it's indifferent to me. I always try to find non-standard ways of the decision and I always achieve my goals. That's all. 2 Dimont: So there's no ways to destroy trackable object. I have another ideas but I shall write about them only if check will be successful. |
| 10-24-2003, 10:58 PM | #11 |
Can trackables be used in multiplayer games without causing de-syncs? |
| 10-25-2003, 09:54 AM | #12 |
That's a pretty good question. Someone ought to try that out, since I can't do that myself (only got 1 comp, and can't host b.net games). Feel free to look at my map to see how to use the trackable. |
| 10-25-2003, 11:39 AM | #13 |
This is sweet. We'll have to add these events to UMSWE and WEU. I'm also quite sure they work on bnet as both create action and events are common.j natives. |
| 10-25-2003, 02:56 PM | #14 |
They may also work to block clicks to certain regions Outsdanding |
| 10-25-2003, 03:26 PM | #15 |
Yeah I noticed that too, it could pose a problem unless that's what you want it to do. It's pretty amazing to see how it works, actually. I set the model to Earthquake, and it only registers the mouse move/click on the small chunks of rock. Effects and texture changes doesn't get registered. |
