Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1 Screenshot

  • 1,890
  • 205
  • 4.78 kB

About GridAPI

Simple API for retrieving in-game grid coordinates from a Vector3 position, and vice versa.

 

String[] GetGrid(Vector3 pos)

returns the grid coordinates for the given position.

 

object IntersectionPosFromGrid(string a, string b)

returns Vector3 intersection (top left on map) for a given set of map coordinates.
returns string message if input strings are not valid.

 

object MiddlePosFromGrid(string a, string b)

returns Vector3 centre of grid for a given set of map coordinates.
returns string message if input strings are not valid.

 

Object RandomPosFromGrid(string a, string b, int radius)

returns Vector3 viable player position for a given set of map coordinates, within the provided radius of grid centre.

returns string message if input strings are not valid.
returns string message if no valid location can be found.

*Useful for Tping or spawning players/npcs.

  • Like 1
  • Love 1

Steenamaroo's Other Downloads


User Feedback

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

6,841 files sold to 616 customers and $99,224 of payments processed this year!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.