Jump to content

In range vs. In Proximity


Eagle93

Recommended Posts

What is the difference between these two settings for a zone? Does a zone have to be "in range" from the current position before distance/bearing will display?

 

Does "In Proximity" indicate the distance at which the "on Enter" event will fire for the zone?

 

Working on my first catridge and want to make sure I have this right.

 

Thanks!

Link to comment

What is the difference between these two settings for a zone? Does a zone have to be "in range" from the current position before distance/bearing will display?

 

Does "In Proximity" indicate the distance at which the "on Enter" event will fire for the zone?

 

Working on my first catridge and want to make sure I have this right.

 

Thanks!

 

The Distance sets the distance where the player gets the distance and bearing. It can also be used to trigger events.

Proximity allows you to set a different trigger.

At least that's what I use it for.

Link to comment

that's right

 

Distance is the distance where the zone becomes visible in list of zones

 

Proximity is a shorter distance - it can be used for triggering events, or for showing items when within it

 

Enter is separate from that - OnEnter fires when the player actually enters the shape

OnProximity fires when the player is within Proximity to the shape, and OnDistance is when she gets within Distance.

 

Zone_events.png

the red dot in the middle is the zone's actual shape

Link to comment

Zone_events.png

the red dot in the middle is the zone's actual shape

 

Thank you for the illustration. However I am still looking for answers to the following questions and I am wondering if you might know the answer:

 

- are the distances (red arrows) measured to the "zoneXXX.OriginalPoint" point or to the 'nearest' edge?

- if the former - how does it work if this point is outside the actual zone?

- if the latter, it seems to be computational very expensive

 

Related questions:

 

- does the arrow (and indication of distance) point to the "zoneXXX.OriginalPoint" point or to the 'nearest' edge?

- if it always uses the edge, what is the point of "zoneXXX.OriginalPoint" ?

Link to comment
- are the distances (red arrows) measured to the "zoneXXX.OriginalPoint" point or to the 'nearest' edge?
nearest edge
- if the latter, it seems to be computational very expensive
it is! that's why you can't effectively have more than 8 zones on Oregons. (it is possible, via a hack in a cartridge, to change this to consider only OriginalPoint - the most visible result is that OnEnter behaves rather unexpectedly, but it works quite well)

 

- does the arrow (and indication of distance) point to the "zoneXXX.OriginalPoint" point or to the 'nearest' edge?
nearest edge - specifically, nearest point of the nearest edge

(unless you employ the hack mentioned)

- if it always uses the edge, what is the point of "zoneXXX.OriginalPoint" ?
hard to tell ;e) items dropped in the zone are located on the OriginalPoint, can't think of anything else

so yes, you can have an item "physically" located outside the zone (its ObjectLocation), but logically contained in the zone (Container)

Link to comment

it is possible, via a hack in a cartridge, to change this to consider only OriginalPoint - the most visible result is that OnEnter behaves rather unexpectedly, but it works quite well

 

Could you tell me more about this hack? I suppose you could collapse the whole zone into a single point - is that what you mean?

Link to comment

that's not it. due to the way the official Player is designed, you can poke into some of its internals from Lua. one of the interesting methods handles calculating distances to zones.

you can replace this method by your own, which calculates distance to a single point.

 

this obviously won't work in openwig, but it does no harm there either, and openwig is already highly optimized to handle the load of many active zones at once

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...