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

Hashtables

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2008
Messages
233
I've tried to crate a hashtable, but there's no such function in my JNGP. Do i have to use some other editor or what?

Ive also seen the tutorial about it and it doesn't say anything about this only a screenshot of the trigger, but i cant seem to find.

How do i make hastable?

And another thing:
Lets say I pick units and make special effect on them, could i store group of those special effects in hastable?
 
Level 6
Joined
Dec 9, 2008
Messages
233
jesus not that again..I've seen this like million times -.-

I don't have an action called Hashtable - Create a hashtable otherwise i wouldn't be asking this question

EDIT: just opened my 1.26 WE and its there, I've been using 1.21a the whole time 'cos all JNGP functions work there..omg
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Wait... JNPG has some troubles working with Hashtables. It doesn't have the actions to load handles (Key (Handle)). You can do it with jass and custom scripts, but not with GUI. Common WE does have the Key(Handle) actions in GUI. You can create them there and then import them to your map (if it needs JNPG to be saved).

An 'easy way' to do it without having to import stuff is adding the handle to an integer, and using that integer. It works for almost anything (units, items, destructibles, etc.)

  • Custom script: set udg_integer = GetHandleId(GetLastCreatedItem())
  • Hashtable - Save integer as 0 of integer in YourHashtable
GetHandleId is the same than (Key (Handle)) You just have to know the "jass" name of what you want, or declare it into a variable like

  • Set u = Last created unit
  • Custom script: set udg_integer = GetHandleId(udg_u)
  • Hashtable - Save 0 as 0 of integer in YourHashtable
 
Status
Not open for further replies.
Top