User:Outofspace/Shape Scripts: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Outofspace No edit summary |
>Outofspace ok, that's simple. |
||
Line 305: | Line 305: | ||
wait(0.5) | wait(0.5) | ||
end | |||
</pre> | |||
== Terrain Generators == | |||
More modifications of Mindraker's scripts. This time in <i>Useful</i> format. | |||
Lets start off with something simple. Uphill inclination: | |||
<pre> | |||
x=1 | |||
y=1 | |||
z=1 | |||
for i = 0, 100, 10 do | |||
for k = 0, 100, 10 do | |||
for j = 0, 10, 1 do | |||
x=i^2 | |||
y=math.sqrt(i) | |||
z=k*3/2 | |||
p = Instance.new("Part") | |||
p.CFrame = CFrame.new(Vector3.new(i,1,k)) | |||
p.Size = Vector3.new(10,y,10) | |||
p.Anchored = true | |||
p.Color = Color3.new(1) | |||
p.Parent = game.Workspace | |||
--wait(1) | |||
end | |||
end | |||
end | end | ||
</pre> | </pre> |
Revision as of 14:00, 24 December 2008
The Shape Scripts
Accidents occur:
Red Wall of Lag
Hahaha.
x = 1 y = 1 z = 1 for i = 1, 196 do xx = x +4 ^ 2 / 3 ^3 / 8 x = xx yy = y +4 ^ 2 / 3 y = yy zz = z +4 ^ 2 / 3 ^ 3 / 8 z =zz p = Instance.new("Part") p.Parent = game.Workspace p.Size = Vector3.new(1,1,1) p.Position = Vector3.new(x,1.8,z) p.Anchored = true p.Color = Color3.new(1) wait(0.05) end
Stair Maker
Ok, this was useful once.
x = 1 xx = 1 xxx = 1 for i=1,10 do --Replace 10 with the number of steps you want. local a = Instance.new("Part") a.Parent = game.Workspace a.Anchored = true a.Locked = true --y = x+5*10/3 yy = xx+10*10/4 yyy = xxx+15*10/8 a.Position = Vector3.new(y, yy, yyy) z = x + 1 zz = xx + 1 zzz = xxx + 1 x = z xx = zz xxx = zzz wait(0.5) end
A cool variation of the double helix scripts that acts as stairs:
--Best when "wait()" is used. --Makes for a awesome effect! local i = 0 for i = 0, 100, .1 do local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(14,1,14) p.Anchored = true p.Position=Vector3.new(100*math.cos(i), 17*i, 150*math.sin(i)) local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(14,1,14) p.Anchored = true p.Position=Vector3.new(-100*math.sin(i), 17*i, 150*math.cos(i)) wait() end
Random
Looks like a tree.
x = 1 xx = 1 xxx = 1 for i=1,25 do --Replace 10 with the number of steps you want. local a = Instance.new("Part") a.Parent = game.Workspace --a.Anchored = true --a.Locked = true y = x+5*-10/3 yy = xx+6*-10/4 yyy = xxx+7*-10/5 --a.Position = Vector3.new(y, yy, yyy) a.Size = Vector3.new(y, yy, yyy) z = x + 1 zz = xx + 2 zzz = xxx + 3 x = z xx = zz xxx = zzz wait(0.5) end
Double Helix
Thanks again to Mindraker, for providing the original script (which will now be dissected.)
The following was made by accident...rofl...
local i = 0 for i = 0, 250, .1 do local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(100*math.cos(i), 15*i, 10*math.sin(i)) local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(-100*math.sin(i), 15*i, 10*math.cos(i)) wait() end
One that acts as stairs:
local i = 0 for i = 0, 100, .1 do local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(100*math.cos(i), 15*i, 20*math.sin(i)) local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(-100*math.sin(i), 15*i, 20*math.cos(i)) wait() end
Even crazier...
local i = 0 for i = 0, 100, .1 do local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(100*math.cos(i), 15*i, 250*math.sin(i)) local p = Instance.new("Part") p.Parent = game.Workspace p.Name = "Brick" p.Size = Vector3.new(11,1,11) p.Anchored = true p.Position=Vector3.new(-100*math.sin(i), 15*i, 10*math.cos(i)) wait() end
Quadrilateral...thing
I forgot the name of the shape.
x = 1 xx = 1 xxx = 1 for i=1,25 do --Replace 10 with the number of steps you want. local a = Instance.new("Part") a.Parent = game.Workspace a.Anchored = true --a.Locked = true y = x+5^1*10*1/2^1-400 yy = xx+5^2*10*2/2^2-400 yyy = xxx+5^3*10*3/2^3-400 --a.Position = Vector3.new(y, yy, yyy) a.Size = Vector3.new(y, yy, yyy) z = x + 1 zz = xx + 1 zzz = xxx + 1 x = z xx = zz xxx = zzz wait(0.1) end
Mountain
Slightly more successful. It's a modified version of his script.
x=1 y=1 for i = 1, 10 do x=x+x y=x + 2 * 4 /3 z=y^2 / 4 p = Instance.new("Part") p.CFrame = CFrame.new(Vector3.new(1,1.8,1)) p.Size = Vector3.new(x,z,y) p.Anchored = true p.Color = Color3.new(1) p.Parent = game.Workspace wait(0.5) end
Here's a variation of it:
x=1 y=1 for i = 1, 10 do x=x + 2 + x * 5 / 10 y=x + 2 * 4 /3 z=y^2 / 3 p = Instance.new("Part") p.CFrame = CFrame.new(Vector3.new(1,1.8,1)) p.Size = Vector3.new(x,z,y) p.Anchored = true p.Color = Color3.new(1) p.Parent = game.Workspace wait(0.5) end
Click here for a copy!. Here's the terrain script (2nd Variation):
x=1 y=1 for i = 1, 10 do x=x+x + 60 / 20 y=x +1 z=y ^ 2 / 3 p = Instance.new("Part") p.CFrame = CFrame.new(Vector3.new(1,1.8,1)) p.Size = Vector3.new(x,z,y) p.Anchored = true p.Color = Color3.new(1) p.Parent = game.Workspace wait(0.5) end
Terrain Generators
More modifications of Mindraker's scripts. This time in Useful format.
Lets start off with something simple. Uphill inclination:
x=1 y=1 z=1 for i = 0, 100, 10 do for k = 0, 100, 10 do for j = 0, 10, 1 do x=i^2 y=math.sqrt(i) z=k*3/2 p = Instance.new("Part") p.CFrame = CFrame.new(Vector3.new(i,1,k)) p.Size = Vector3.new(10,y,10) p.Anchored = true p.Color = Color3.new(1) p.Parent = game.Workspace --wait(1) end end end