• 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.

[JASS] Attaching values to trackables...

Status
Not open for further replies.
Level 25
Joined
Jun 5, 2008
Messages
2,573
I know that it is possible and i mean like you click a trackable and it shows a value we stored.
To explain better, this is what i need:
  • i create a trackable(i know how to)
  • i set a specific value
  • i attach that value to the trackable
  • when i click the trackable the value is shown

Reputation will be given.
To a very efficent answer credits in my inventory system will be given.
 
Level 16
Joined
Feb 22, 2006
Messages
960
try it with struct attaching, you attach the struct to the trackable and if a trackable is klicked just show the struct :O
JASS:
function action takes nothing returns nothing
    local trackable bla = GetTriggeringTrackable()
    local someStruct dat = GetAttachedStruct(bla)
    local integer i = dat.info
endfunction
But before dont forget to attach struct and set info :D

for that you could use this system: Click Me :)
 
Level 8
Joined
Aug 6, 2008
Messages
451
If you create all trackables on map init, you can easily use H2I( trackable ) - MIN_HANDLE_COUNT and a struct array for attaching. Table is also good.
 
Status
Not open for further replies.
Top