Dr Super Good
Spell Reviewer
- Joined
- Jan 18, 2005
- Messages
- 27,285
It does not allow you to enter any ID upon object creation. That is a JNGP feature.The world editor won't allow you to enter the same ID upon object creation.
And how is this good practice? I would say better practice is to try and reuse the same hashtable as much as possible for short term storage.For spells, you usually only attach to two different types anyway: units and timers. And while collision is impossible that way, it's still a good practice to have a global table each:
For example, have a general "UNIT_HASH" containing data stored to GetHandleId(unit), then the childkeys indexed by the spell member identifiers (global constants that are unique for each variable in coded spells) and one more table "TIMER_HASH" for all dynamically created and destroyed timers (This is by far the more frequently used one of the two ... you rarely need to attach to units).