• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Get Location of Trackable

Status
Not open for further replies.
Hello, I am rly inactive on THW in last time so I have a question, how to get location of trackable, I know one way but in it i need to create one trigger per trackable and making about 70 triggers isnt best idea, so how can I do it in GUI with JNGP not jass but I can accept custom scipt. And is it here some good way for keepen then in variable, if u havent understood last part ask for more.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Trackables cannot move. Save their locations when you create them. Trackables are not available within the normal GUI. You probably meant the outdated UMSWE plugin people usually advise against for a number of reasons.

Multiple selections can be done within an iteration. So no, you do not need to write 70 triggers or if branches.
 
JASS:
/* Save */

local trackable track = CreateTrackable("mode.mdx", x, y)
call SaveReal(hash, GetHandleId(track), keyX, x)
call SaveReal(hash, GetHandleId(track), keyY, y)

/* Load */

set x = LoadReal(hash, GetHandleId(GetTriggeringTrackable()), keyX)
set y = LoadReal(hash, GetHandleId(GetTriggeringTrackable()), keyY)
 
Status
Not open for further replies.
Top