Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you develop a map rotation system?

Asked by 10 years ago

You know how most popular games have rounds, and a new map is chosen every round to be the setting? How exactly does that work, and how can you construct it?

I know it involves A: A script that spawns players in the map, and B: maps that need to be loaded within a certain location.

2 answers

Log in to vote
0
Answered by
iiSiv 10
10 years ago

If you're looking for a random map rotation system, here's the script for you:

--Add your seperate map models to "Lighting" and change the names from "Map1" to your map names.
maps = {game.Lighting.Map1, game.Lighting.Map2, game.Lighting.Map3}

function selectmap()
select = maps[math.random(1,#maps)]
map = select:Clone()
map:MakeJoints()
map.Parent = game.Workspace
end

--Just add "selectmap()" to where you want the code to be fired

--Ex:
--if game.Workspace.Time.Value == 0 then
--resetgame()
--wait(45)
--selectmap()
--game.Workspace.Time.Value = 120
--end

Ad
Log in to vote
0
Answered by 10 years ago

while true do game.Workspace.ChaosCanyonDoor.Transparency = .5 game.Workspace.ChaosCanyonDoor.CanCollide = false wait(600) game.Workspace.ChaosCanyonDoor.CanCollide = true game.Workspace.ChaosCanyonDoor.Transparency = 0 game.Workspace.CrossroadsDoor.Transparency = .5 game.Workspace.CrossroadsDoor.CanCollide = false wait(600) game.Workspace.CrossroadsDoor.CanCollide = true game.Workspace.CrossroadsDoor.Transparency = 0 game.Workspace.GlassHousesDoor.Transparency = .5 game.Workspace.GlassHousesDoor.CanCollide = false wait(600) game.Workspace.GlassHousesDoor.CanCollide = true game.Workspace.GlassHousesDoor.Transparency = 0 game.Workspace.RobloxHQDoor.Transparency = .5 game.Workspace.RobloxHQDoor.CanCollide = false wait(600) game.Workspace.RobloxHQDoor.CanCollide = true game.Workspace.RobloxHQDoor.Transparency = 0 game.Workspace.RocketArenaDoor.CanCollide = false game.Workspace.RocketArenaDoor.Transparency = .5 wait(600) game.Workspace.RocketArenaDoor.CanCollide = true game.Workspace.RocketArenaDoor.Transparency = 0

end

Answer this question