• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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