• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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.
 
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.
Back
Top