Jump to content

multiple colrectangles and radar areas from table


kewizzle

Recommended Posts

Hi i want to make it so you have multiple radar areas and they all spawn together and they all are their own instance so when you enter any of them the script will do the same thing in each one around the map

 

heres a sample

WarehouseCol1 = createColRectangle( 2535, 2796, 80, 60 )  and createColRectangle( 1287, 1227, 80, 60 ) 
WarehouseArea1 = createRadarArea( 2535, 2796, 80, 60, 0, 0, 255, 90, root ) and createRadarArea( 1287, 1227, 80, 60, 0, 0, 255, 90, root ) 

 

Link to comment

you can create table and put coordinates and width or height if they vary

 

-- Store your coordinates and width height here
local warehouses = { {x, y, z, width, height},
                     {x1, y2, z2, width2, height},}

local warehouse = {col = {}, radar = {}}
for i, v in ipairs(warehouses) do
  local x, y, z, w, h = unpack(v)
  warehouse.col[i] = createColRectangle(x, y, z, w, h)
  warehouse.radar[i] = createRadarArea(x, y, z, w, h, 0, 0, 255, 90)
end

 

  • Like 1
Link to comment
17 minutes ago, NeverGiveup said:

you can create table and put coordinates and width or height if they vary

 

-- Store your coordinates and width height here
local warehouses = { {x, y, z, width, height},
                     {x1, y2, z2, width2, height},}

local warehouse = {col = {}, radar = {}}
for i, v in ipairs(warehouses) do
  local x, y, z, w, h = unpack(v)
  warehouse.col[i] = createColRectangle(x, y, z, w, h)
  warehouse.radar[i] = createRadarArea(x, y, z, w, h, 0, 0, 255, 90)
end

 

perfect

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...