if relative tile contains entity
#1
can you add if tile x squares to the N/E/S/W of player contains entity?

relative entity tiles would be incredibly useful so you don't have to define as many player positions

Editing for more clarification:

The way I'm thinking about this is basically coordinate offset. With this, you could have two separate methods - absolute value of the coordinate offset or value of the coordinate directional offset. This would look like the following:

Absolute value: 1 input, x and y checks would be separate
if entity x coordinate offset = 1 (options to do =, <, >) would return true if the entity's x coordinate is one tile to the east or west of the player
if entity y value coordinate offset = 1 (options to do =, <, >) would return true if the entity's y coordinate is one tile to the north or south of the player

Directional offset: 2 inputs - one for N/S, one for E/W
if entity relative position is North 1, East 1 -- returns true if the entity is diagonal from the player to the NE
if entity relative position is West 4, South 3 -- returns true if the x coordinate value is 4 less than the player's and the y coordinate is 3 less than the player's
  Reply
#2
Tried reading this again before releasing v1.61, but I need to see this in person to know how this should be handled. There may be methods we can use in place of this.
OSRS Script Factory
  Reply
#3
Added in v1.63 to #getDistance in Map
OSRS Script Factory
  Reply
[-] The following 1 user Likes Project's post:
  • nifty19


Forum Jump:


Users browsing this thread: 1 Guest(s)