[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