|
| 28 Oct 2015 11:14 AM |
Hey Its SPARTAN12334 does anyone out there now how to make/or have a regen script
What im trying to say is I have a game that you can destroy buildings and over a time they regen but not the same map. I would like to have a different map each time it regens plz reply back it will be a big helper for a game.
It might be on the front page in the future
Sincerely to anyone out there with a helpful reply, SPARTAN12334 |
|
|
| Report Abuse |
|
|
| |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 28 Oct 2015 11:18 AM |
get a table of all the available maps choose a map randomly from the table with math.random clone the random map into workspace |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 11:22 AM |
| have you done a random map regen script before if so send me a message with the script in it, if so thank you |
|
|
| Report Abuse |
|
|
| |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 28 Oct 2015 11:23 AM |
| "skropt game pls wil pay big mone" |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 28 Oct 2015 11:23 AM |
Random maps?
math.noise()
Regen?
Just use a for loop and iterate through the broken parts and then slowly make them become less transparent till their solid? |
|
|
| Report Abuse |
|
|
Rellica
|
  |
| Joined: 11 May 2013 |
| Total Posts: 955 |
|
|
| 28 Oct 2015 11:24 AM |
local maps = game.Lighting.Maps:GetChildren() local selected_map = maps[math.random(1,#maps)] selected_map:Clone()
selected_map is the Model that was picked randomly out of "Maps" in Lighting. |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 28 Oct 2015 11:27 AM |
big pet peeve anyone who knows a little bit about FE:
don't use lighting to store important crap like maps/weapons.
pls
use ServerStorage |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 11:31 AM |
I was thinking something like this?: (I don't know that much about scripting)
model.remove() -the current model model.math(numbers) clone.model()-the chosen model something like that reply back if ya want
|
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 28 Oct 2015 11:33 AM |
local maps = game.ServerStorage.Maps:GetChildren()
local map = maps[math.random(1,#maps)
|
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 28 Oct 2015 11:36 AM |
i don't want to be that guy but
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
you really need it
also if you want to call a method with the . syntax instead of :, you need to do this for example:
local clone = yourModel.Clone(yourModel) if i remember correctly |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 11:52 AM |
^^this^^
it's annoying to have people posting wanting us to send them ready made scripts.
Scripters forum isn't your personal little army of scripters. learn how to script and come here when you actually have an issue (yeah ik it isn't script helpers but whatever), and don't just come here to expect Scripters posters to just hand you scripts. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 12:03 PM |
| Go post your argument on another thread |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Oct 2015 12:21 PM |
| Generate fresh random numbers by using this line math.randomseed(tick()) |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 12:26 PM |
here is what I came up with: while true do local msg = Instance.new("Its time for a new map :D") local map1 = game.Lighting["Map1"] local map2 = game.Lighting["Map2"] local rand = math.random(1,2) if rand == 1 then local mc = map1:clone("Map1") mc.Parent = game.Workspace msg.Parent = game.Workspace msg.Text = "Office and Truss have been chosen" wait(3) msg.parent = nil wait(180) mc:remove("Map1") elseif rand == 2 then local mc = map1:clone("Map2") mc.Parent = game.Workspace msg.Parent = game.Workspace msg.Text = "Twin Doomspire has been chosen" wait(3) msg.parent = nil wait(180) mc:remove("Map2") end end it doesn't seem to work. I have 2 maps in there I also put the maps in lighting is that bad or good?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Oct 2015 12:35 PM |
| why did you put something in the parentheses of :remove() ? i dont think youve ever scripted before |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 12:36 PM |
No one will make a script for you here...
Go learn the whole scripting through wiki, sloth. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Oct 2015 12:44 PM |
| this is my fourth attempt to scripting, I've been trying so hard but it didn't seem to work. I will fix it |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 12:48 PM |
Here's your way to getting better and not being crap:
http://wiki.roblox.com/index.php?title=AllTutorials |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 28 Oct 2015 01:01 PM |
put a folder inside of ServerStorage named Maps put your maps inside of the Maps folder
randomly pick a map from your maps folder like so:
local ss = game:GetService("ServerStorage") local maps = ss:WaitForChild("Maps"):GetChildren() local randMap = maps[math.random(1, #maps)]
Instance.new("Message", workspace).Text = "New map is: "..randMap.Name) |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2015 01:19 PM |
this is what I have so far while true do local ss = game:GetService("ServerStorage") local maps = ss:WaitForChild("Maps"):GetChildren() local randMap = maps[math.random(1,2)] if rand == 1 then Instance.new("Regen", workspace).Text = "New map is:Map1 "..randMap.Map1) local mc = Map1:clone() mc.Parent = game.Workspace msg.Parent = game.Workspace wait(3) msg.parent = nil wait(10) mc:remove() elseif rand == 2 then Instance.new("Regen", workspace).Text = "New map is:Map2 "..randMap.Map2) local mc = Map2:clone() mc.Parent = game.Workspace msg.Parent = game.Workspace wait(3) msg.parent = nil wait(10) mc:remove() end end
I added the first 3 lines of code you required for me but I didn't know where to add the code lines of Instance so I tried. |
|
|
| Report Abuse |
|
|