RoboCatz.com
About FLL | Navigation | Playbook | Strategy | Models | Techniques | RobotC | Programming | Robot News |

Spiral Staircase

The art museum is created from a collection of scripts stored in various places in Roblox. You will need to create and install these scripts in your Roblox world in order to see the Art Museum.

ReplicatedStorage

The following scripts need to be added to your ReplicatedStorage area:

genericShapes (genericShapes-ModuleScript.htm)
This module creates the generic shapes used in the art museum.

mazeGenerator (mazeGenerator-ModuleScript.htm)
This module will generate the maze used in the Museum.

artInstallationRoom (artInstallationRoom-ModuleScript.htm)
This module installs the art in a room and coordinates where the room is located in the museum.

spiralStaircase (spiralStaircase-ModuleScript.htm)
This module demonstrates the steps to create a spiral staircase.

Baseplate Scripts

The baseplate is loaded when the Roblox world is started. The baseplate may have a Script associated with it. The name of this script should be: baseplateScript and it should be a "Script" added to the baseplate of your Roblox world. Below are a few examples of baseplateScript content to enable you to experiment with different possibilities for coding art exhibits.

The code below will help you to explore how a spiral staircase can be created.

Practice Exhibit Space

The code below will help you to practice creating an art installation. Uncomment the various lines below that start with "--k". Each time you uncomment a line, run the program to see what change that made.

Example:
--baseplateScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local b = require(ReplicatedStorage.artInstallationRoom)
local e = require(ReplicatedStorage.spiralStaircase)
local m = require(ReplicatedStorage.mazeGenerator)
local s = require(ReplicatedStorage.genericShapes)
-- Used to detect where the humanoid is located
local Players = game:GetService("Players")



b.setWidth(75)
b.setLength(75)
local wallWidth = 3

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
		local iteration = 1
		local currentRoomCenter = nil
		local currentRoomSize = nil
		while humanoidRootPart do
			-- This will load the newQbert space from the studentExhibit module
			-- Once loaded, you can then edit the studentExhibit module newQbert() function to create your exhibit.
			local k=nil
			k=e.straightStaircaseVariesOnX(75, 75)
			--k=e.straightStaircaseVariesOnZ(75, 75)
			--k=e.straightStaircaseVariesOnXandZ(75, 75)
			--k=e.spheresInCircle(75, 75)
			--k=e.panelsInCircle(75, 75)
			--k=e.horizontalPanelsInCircle(75, 75)
			--k=e.rotatedPanelsInCircle(75, 75)
			k.draw()
			local iteration = 1
			k.defineInteractions()
			currentRoomCenter = k.room.center
			currentRoomSize = k.room.size
			while true do
				k.animate({ 
					iteration=iteration, 
					locationInRoom = 100 * ((currentRoomCenter + currentRoomSize/2) - humanoidRootPart.Position)/currentRoomSize
				})
				wait(0.1)
			end
		end
	end)
end)