Optiics
|
  |
| Joined: 05 Mar 2013 |
| Total Posts: 1619 |
|
|
| 11 Mar 2013 02:56 PM |
I found a plugin which creates a map of a place but I'm trying to figure out how I can make it work. I don't understand where it starts creating the map and what the other settings do. Can someone explain?
Here is the .lua:
-- To get a more controlled map, change these settings. --
StartX = 1000 -- The Starting X Position of the map StartY = 1000 -- The Starting Y Position of the map Scale = 1 -- The scale of the map, 1 is 1 point per stud. SizeX = 800 -- The X size of the map. Starting at -200x, you would need 400 size to make 0x centered. SizeY = 600 -- The Y size of the map. Depth = 900 -- The depth of the survey area. 900 captures everything under 900 studs. Don't go over 999, or things lower won't show up. This is good for building maps. Pixel = 1 -- The size of each pixel. This has no effect on the survey points, just the display.
-- Each time you change a setting, you have to exit the place and reopen it.
local Workspace = Workspace local function rayCast(Pos, Dir, Max, Ignore) return Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) end
ABORT=false rendering=false
checkColor=function(pos) local Dir = Vector3.new(0,-1,0) local Hit, Pos = rayCast(pos, Dir) if Hit then return Hit.BrickColor.Color else return BrickColor.new("Really black").Color end end
map = nil
draw = function(startx, starty, steps, sizex, sizey, depth, size) rendering=true if map then map:remove() end core = Instance.new("ScreenGui", game:GetService("CoreGui")) map = Instance.new("Frame",core) map.Position=UDim2.new(0,5,0,5)
lastColorX = Color3.new(0,0,0) lastObjectX = nil
curx,cury=0,0 for y = starty, starty+(sizey*steps), steps do for x = startx, startx+(sizex*steps), steps do col = checkColor(Vector3.new(x,depth,y))
if col ~= lastColorX then b=Instance.new("TextLabel") b.Text="" b.Parent=map b.BackgroundColor3=col b.BorderSizePixel=0 b.Position=UDim2.new(0,((curx-1)*size),0,((cury-1)*size)) b.Size=UDim2.new(0,size,0,size) lastObjectX=b else lastObjectX.Size = lastObjectX.Size + UDim2.new(0,size,0,0) end
lastColorX = col
curx=curx+1 --wait() end wait() curx=0 lastColorX = Color3.new(.003,.003,.003) cury=cury+1 if ABORT then return end end rendering=false end
--draw(-133, -103, tehr, (133+28)*(1/tehr), (103+20)*(1/tehr))
Off = function()
end
loaded = false
self = PluginManager():CreatePlugin() self.Deactivation:connect(function() Off() end)
toolbar = self:CreateToolbar("Map")
tehr = 1
local plug = toolbar:CreateButton("Map","Create an overhead map","map.png") plug.Click:connect(function() --draw(-133, -103, tehr, (133+28)*(1/tehr), (103+20)*(1/tehr), 100, 1) --draw(-200, -200, tehr, (400)*(1/tehr), (400)*(1/tehr), 299, 1) draw(StartX, StartY, Scale, (SizeX)*(1/tehr), (SizeY)*(1/tehr), Depth, Pixel) --startx, starty, steps, sizex, sizey, depth, size end)
loaded = true print("Manager Loaded") |
|
|
| Report Abuse |
|
Optiics
|
  |
| Joined: 05 Mar 2013 |
| Total Posts: 1619 |
|
|
| 11 Mar 2013 03:14 PM |
StartX = 1000 -- The Starting X Position of the map StartY = 1000 -- The Starting Y Position of the map Scale = 1 -- The scale of the map, 1 is 1 point per stud.
I just don't understand that part. How can I determine where StartX is? How do I know where I can start it from?
And what is Scale? |
|
|
| Report Abuse |
|
|
| 11 Mar 2013 04:06 PM |
Those are variables; they're there for you to set them to your preferences.
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
Optiics
|
  |
| Joined: 05 Mar 2013 |
| Total Posts: 1619 |
|
|
| 11 Mar 2013 04:11 PM |
@knight
I know what they are, but how do I obtain them? |
|
|
| Report Abuse |
|
Optiics
|
  |
| Joined: 05 Mar 2013 |
| Total Posts: 1619 |
|
| |
Optiics
|
  |
| Joined: 05 Mar 2013 |
| Total Posts: 1619 |
|
| |