kewizzle Posted June 20, 2022 Share Posted June 20, 2022 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
roaddog Posted June 20, 2022 Share Posted June 20, 2022 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 1 Link to comment
kewizzle Posted June 20, 2022 Author Share Posted June 20, 2022 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now