Jump to content

Random coords inside radararea?


roaddog

Recommended Posts

When you create it you could save it's coordinates and size as element data for easy access and then use:

local x = math.random(x_pos, x_pos+x_size) 
local y = math.random(y_pos, y_pos+y_size) 

To get some random coordinates within.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...