|
| 29 Aug 2012 04:21 PM |
I know how to use the InsertService so I'm gonna use that for inserting maps, but I don't know how to randomize the map chosen! Would I put:
local Map = math.random(1,20)
if Map == 7 then
--Insert the Map here.
Would that work? I bet it would, but is there a better not so highly - inefficient way? I don't really wanna make a 200 line script just for that... If that's what it takes, I'll do it, but I just wanna know if there's a better, faster way. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:24 PM |
Put the maps into Lighting.
maps = game.Lighting:GetChildren() for i,v in ipairs(maps) do ma = math.random(1,20) c = v[ma]:clone() c.Parent = Workspace end
|
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:29 PM |
| T_T Really? You just had to skim? I said, I know how to insert maps! I was asking if there's a more efficient way! Wait... Okay, that would work, but I am not using Lighting. That generates lag. Even if I have to spend much more time writing code, I don't want my game laggy! Plus, you didn't have to give me a few lines of broken code, as I already know how to make that better, with more readability and non-broken. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:30 PM |
map = *MapModel*:getChildren()[1, #*MapModel*:getChildren()]
~ Moo logic = logical logic ~ |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:34 PM |
| T_T THAT DOES NOT HELP ME!!! I SAID I NEED HELP RANDOMIZING THE MAP CHOSEN!!! I don't need any more Posts on this... I guess I kinda do have to write 200 lines of code... Not literally... Probably less than that, in reality. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:38 PM |
The only way is to put them in lighting, unless you put all the assetIDs of the maps in a table. Then randomly choose one of the values in the table, then use that assetID to insert a map.
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible!~ |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:41 PM |
| ..If you know so much better then us then ya go do it yourself. But our solutions are better then yours, by far. And if you can't understand my code, maybe you should study up on tables, because my code works. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:43 PM |
^ It does work but from some reason Dozer doesn't want to put the maps in lighting and wants to insert them.
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible!~ |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 04:45 PM |
Putting things in Lighting does not cause much lag.
¤¤ †KMXD† ¤¤ [SHG Tier~3] [Freelancing Scripting Guru] •д• |
|
|
| Report Abuse |
|
|