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 » Game Design
Home Search
 

Re: Expert help please

Previous Thread :: Next Thread 
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
20 Mar 2015 06:20 PM
while (map1 ==map2 or map3) or (map2==map1 or map3) or (map3==map1 or map2) do
map1=Maps[math.random(1,#Maps)]
map2=Maps[math.random(1,#Maps)]
map3=Maps[math.random(1,#Maps)]
wait(1)
end

Will this just go on forever?
How can I fix it?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
20 Mar 2015 08:01 PM
pl0x
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
20 Mar 2015 08:19 PM
mapTime = 180
maps = {"","",""}
while wait(mapTime) do
local map = math.random(#maps)do
map:Clone()
map.Parent = game.Workspace
end
end)



Thats prob not right, but sometin like dat
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
20 Mar 2015 08:21 PM
I'm trying to select maps for a voting system, not do a round
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
20 Mar 2015 09:01 PM
Oh
Report Abuse
LennyTheLucario is not online. LennyTheLucario
Joined: 26 Aug 2010
Total Posts: 10770
20 Mar 2015 09:28 PM
function ChooseMaps()
wait()
map1=Maps[math.random(1,#Maps)]
map2=Maps[math.random(1,#Maps)]
map3=Maps[math.random(1,#Maps)]
end

repeat ChooseMaps() until map1 ~= map2 or map3 and map2 ~= map1 or map3 and map3 ~= map1 or map2

That could help, if not, I can write up something a little bit better. I just wrote this up in a matter of 30 seconds or so, so if it doesn't work, just say so and I'll write one that'll work for sure.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
20 Mar 2015 09:51 PM
^thanks
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Mar 2015 10:12 PM
Guys let's be efficient here:

map1 = table.remove(maps, math.random(#maps));
map2 = table.remove(maps, math.random(#maps));
map3 = table.remove(maps, math.random(#maps));
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
21 Mar 2015 10:42 AM
Well, cn't i tried this
map1=Maps[math.random(1,#Maps)]
table.remove(Maps,map1)
etc, but didn't work
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Mar 2015 01:22 PM
Because you're doing it wrong, look at mine. table.remove takes the index, not the value.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
22 Mar 2015 09:39 AM
Hmm
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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