Jump to content


Photo

Position coordinates


  • Please log in to reply
5 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 19 August 2017 - 01:56 PM

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.


#2 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 20 August 2017 - 08:24 AM

IIRC the trap spells use some map marker opcode.


Retired from modding.


#3 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 20 August 2017 - 08:45 AM

Does anybody know any way to cheat the system, like getting the coordinates of a creature and inserting them... or somesuch?

Yes, you set up NPC hub, which you set up the known locations, to where you send the NPCs in dialog. Just like the Send NPCs to Inns components in multiple mods.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#4 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 20 August 2017 - 10:35 AM

I think he wants to mark where NPCs have been told to "stay here and wait for me" by the player. That indeed is impossible to predict, as it's defined by the player rather than modder or designer.


Retired from modding.


#5 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 20 August 2017 - 10:58 AM

I think he wants to mark where NPCs have been told to "stay here and wait for me" by the player. That indeed is impossible to predict, as it's defined by the player rather than modder or designer.

The game has a feature for the player to add map markers with a free text, e.g. *Left Viconia here*. Are you assuming players cannot use this if they want a reminder? Why automate when automation is not needed. Consider how to remove that marker again when you pick up the NPC later.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#6 temnix

temnix
  • Member
  • 983 posts

Posted 20 August 2017 - 11:02 AM

Well... you're right, for the most part. I started working on a system, but it's really too much of a bother to go through with.