PDA

View Full Version : [2.xx] Get UIDs and use them as Pointers



ZoriaRPG
06-05-2015, 01:53 AM
That's right... Determine the UID of an object (enemy, weapon) and use it as a pointer for coordinates, and other things. This has some interesting usefulness, for scripting, because the NPC_>ID is not always a useful pointer, whereas the UID might be.

It would otherwise be useful to have a pointer specific to the main component of multi-component enemies. It would be neat if there was a way to define even a limited number of arbitrary custom pointers, by script, too. Ghost.zh would certainly benefit from this, if a ghosted enemy could have a unique pointer while on-screen.

Tamamo
06-06-2015, 01:15 PM
I'm not sure I understand mind elaborating what you mean? Do you want custom pointers?

ZoriaRPG
06-06-2015, 07:46 PM
I just want to be able to utilise the UIDs assigned to all screen components (lweapons, eweapons, npcs, and such) as pointers. Everything is given a UID, but those values are at present, absolutely useless (to the user).

You can't even determine what UID belongs to anything, because you can't pass any reference by UID. Despite this, Allegro reports errors by UID, so they're clearly implemented in a way that should permit user-end control, with appropriate expansion of the ZScript language to accommodate that.