generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Changing maze

Previous Thread :: Next Thread 
Lagaan2 is not online. Lagaan2
Joined: 31 Dec 2011
Total Posts: 167
29 Jun 2013 08:16 PM
I'm working on a place that has a maze that needs to change with every night/day cycle. I know almost nothing about scripting, so how would I do this?
Report Abuse
monstre180 is not online. monstre180
Joined: 02 May 2009
Total Posts: 110
29 Jun 2013 09:02 PM
Alright, just saying:

Programming functional mazes that have a start and end is actually extremely advanced.
I've tried many times before and almost got a working one once but not completely
Report Abuse
Sk8terdude545 is not online. Sk8terdude545
Joined: 28 Jan 2009
Total Posts: 735
29 Jun 2013 09:15 PM
What you can do is create a bucnh of different mazes and do math.random for the order of them. That's the simplest possible way to do it.
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
29 Jun 2013 09:18 PM
If you want it to be a different maze every time then make an if statement to check if it is a certain time of day then when that happens have a math.random to change certain bricks to be in a different position, or be invisible and no-collided, and any other property changes.
Report Abuse
monstre180 is not online. monstre180
Joined: 02 May 2009
Total Posts: 110
29 Jun 2013 09:28 PM
here you are, just made it for you
this is probably the closest you'll get to a fully functional maze
enjoy :D




gapX=15
gapZ=15
height=10
mazeRadius=200
seed=math.random(1,1000000) --same seed = same maze

while true do
math.randomseed(seed)
model=Instance.new("Model",game.Workspace)
model.Name="MazeParts"
for z=-mazeRadius/2,mazeRadius/2,gapZ do
for x=-mazeRadius/2,mazeRadius/2,gapX do
part=Instance.new("Part")
part.Parent=model
part.Anchored=true
part.TopSurface="Smooth"
if math.floor(math.random(1,2))==1 then --set the sizes, randomly facing right-left or left-right
part.Size=Vector3.new(gapX,height,2)
else
part.Size=Vector3.new(2,height,gapZ)
end
part.CFrame=CFrame.new(x,height/2,z)
end
end

wait(3) --every 3 seconds the maze changes (you'll probably want it longer haha)
model:remove()
end
Report Abuse
monstre180 is not online. monstre180
Joined: 02 May 2009
Total Posts: 110
29 Jun 2013 09:29 PM
whoops, forgot to fix something,

try THIS one





gapX=15
gapZ=15
height=10
mazeRadius=200

while true do
seed=math.random(1,1000000) --same seed = same maze

math.randomseed(seed)
model=Instance.new("Model",game.Workspace)
model.Name="MazeParts"
for z=-mazeRadius/2,mazeRadius/2,gapZ do
for x=-mazeRadius/2,mazeRadius/2,gapX do
part=Instance.new("Part")
part.Parent=model
part.Anchored=true
part.TopSurface="Smooth"
if math.floor(math.random(1,2))==1 then --set the sizes, randomly facing right-left or left-right
part.Size=Vector3.new(gapX,height,2)
else
part.Size=Vector3.new(2,height,gapZ)
end
part.CFrame=CFrame.new(x,height/2,z)
end
end

wait(3) --every 3 seconds the maze changes (you'll probably want it longer haha)
model:remove()
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image