• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Attaching values to trackables...

Status
Not open for further replies.
Level 25
Joined
Jun 5, 2008
Messages
2,572
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.
 
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 :)
 
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.
Back
Top