• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

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