I'd like to create map notes, for convenience, in a flexible way - next to a creature, if possible, rather than at given coordinates. To make a creature drop a note where it is, saying, e.g., "Companion" for those NPC left standing around. Now, the action is AddMapNote(P:Position*,I:StringRef*), and it's only good if you know what to enter for position. There are a couple of actions that let us write [-1.-1] in a case like this, which means next to the creature invoking the action (requires an avatar, no null animations), but not this one. Does anybody know any way to cheat the system, like getting the coordinates of a creature and inserting them... or somesuch?
By the way, programmers among you, I'm curious what this sort of insertion is called. Insertion of a custom, open object rather than something fixed. More advanced programming languages allow it. There's got to be a name for that.
P.S. Unless there are better options, here's a crude workaround: use NearLocation(O:Object*,I:PointX*,I:PointY*,I:Range*) first in a script to determine proximity to cardinal points. Areas are not terribly large, so you could run checks like this:
IF
NearLocation(Myself,200,200,30)
THEN
(Make a note at [200.200])
DestroySelf()
END
IF
NearLocation(Myself,400,400,30)
THEN
(Make a note there)
Destroyself()
END
And so on. Cumbersome, but if you write in a grid of points this way once, a creature is bound to be close to one of those in any area. Kind of a pain in the ass, true. Only question is, what will happen if a check is made in a small area, where the coordinates don't exist? Will they get "pushed in" or be off-screen? If area borders herd creatures in...
Edited by temnix, 19 August 2017 - 02:06 PM.