Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Feb 2014 08:51 PM |
Hi, I'm looking for the quickest way possible to write an effective script that does the following:
- Waits for 4 or more people to be in the server - Gathers up a list of all players in the game - Randomly teams 2 players to "TeamX" - Teams the rest to "TeamY" - Adds a random child of "game.Lighting.ModelA" to the Workspace - Respawns everyone - Starts a timer for 330 seconds - Waits for "Game.Values.Win.Value" to change from false to true. Then add a message to the Workspace, then removes it after 8 seconds. Team all players to "TeamZ". Respawn all players. - If the timer reaches 0 before Game.Values.Win.Value == true, then add a message to the Workspace, then removes it after 8 seconds. Team all players to "TeamZ". Respawn all players. Set Game.Values.Win.Value to true. - Wait a 20 second intermission - If less than 4 people are in the server, repeat the intermission. Else if there are 4 or more people, repeat the script from the beginning. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Feb 2014 08:54 PM |
| Forgive any typos. If you need any further description, feel free to ask me. I want to see what creative ways this can be done efficiently! |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2014 08:57 PM |
well,not making a whole game for u.. #NoRequests--how hard is that to understand people?? but for the first bit:
repeat wait() until game.Players.NumPlayers>=4 a = 0 for I,v in pairs(game.Players:GetChildren()) do if a<2 then v.TeamColor = BrickColor.new("Really red") a = a+1 else v.TeamColor = BrickColor.new("Really blue") end end |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Feb 2014 09:09 PM |
I've had more complicated scripts written for me by willing individuals. I also plan to add much more to this on my own time. There's unfortunately two forums that are directly dedicated to scripting, so until they add a "scripting requests" forum, I can't think of anywhere better than Scripting Helpers.
I'd just like to see in what ways people could make this script compact, and efficient. This is mainly a learning experience for myself; I'm transitioning from C&G to game development, and would like to learn from people with experience.
Thanks for your code Islandmaker, I'll reference that. |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2014 09:11 PM |
np,i enjoy making scripts,but when people want me to make like 500+line scripts.. I kinda draw the line ur actually rather lucky im the only one who posted here so far a lot of people would flame you for posting a request.. p.s go to LMaD to ask to pay for a scripter |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Feb 2014 09:22 PM |
| Well, I'm not exactly looking to pay for a scripter, I could likely accomplish this on my own (though very ruggedly, and ineffectively, which led me here). Unfortunately too I've spent enough time in LMaD to know that getting a scripter there would be very difficult; people mostly rave about hats and ROBLOX's trading system. People have generally been helpful here (most of the time), it's a nicer community, and my questions are answered almost always. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Feb 2014 09:37 PM |
| I will be bumping this from time to time, seeing as it's a big request. If people want to build off of other posters' code, that's encouraged; no individual has to tackle this whole script. I'll also be working on this myself and will be posting chunks of code for revision. |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2014 09:38 PM |
that's true but this script is pretty long,maybe not as long as I assumed.. but repeat wait() until game.Players.NumPlayers>=4 a = 0 for I,v in pairs(game.Players:GetChildren()) do if a<2 then v.TeamColor = BrickColor.new("Really red") a = a+1 else v.TeamColor = BrickColor.new("Really blue") end end --need to use math.random here,sorry but inserting a random child of a model is --NOT my strong point for a,plr in pairs(game.Players:GetChildren()) do plr:LoadCharacter() end while wait() do if game.Values.Win.Value == true then for a,plr in pairs(game.Players:GetChildren()) do plr:LoadCharacter() plr.TeamColor = BrickColor.new("whatevs") end m = Instance.new("Message",Workspace) for I=8,0,-1 do m.Text = I if I<1 then for a,plr in pairs(game.Players:GetChildren()) do plr:LoadCharacter() plr.TeamColor = BrickColor.new("whatevs") end end --this is not ALL of it,but some,and hopefully should help(untested) |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 25 Feb 2014 02:15 PM |
| Thanks, I'll start building around that. If you can manage to think of a way to select a random child of a model, let me know. I'm giving it the most thought at the moment. |
|
|
| Report Abuse |
|
|