of     1   

Zonix
#698542Thursday, April 03, 2008 6:43 AM GMT

I seem to be having troubles with a regeneration script that regenerates the map and gives me the game total in points. It isn't working, but it's probably because I'm not exactly sure where to put it. -If you can help me, please send me a message. -There is a reward. -Thanks
Zonix
#702638Thursday, April 03, 2008 11:48 PM GMT

bring it up.
jasonwebkinz
#702836Friday, April 04, 2008 12:10 AM GMT

i have published a really good regen script in my models its never failed me, try it out
jasonwebkinz
#702854Friday, April 04, 2008 12:11 AM GMT

oops said wrong thing in other reply yur problem is that u havn't moved yur script into the model you want regened,move it inside the model you want regened
Zonix
#702870Friday, April 04, 2008 12:13 AM GMT

So do I group my whole map and place the script in it? -Thanks
jasonwebkinz
#702885Friday, April 04, 2008 12:14 AM GMT

group all the stuff u want regened then put the script inside
Zonix
#702910Friday, April 04, 2008 12:16 AM GMT

So, say this regen script is timed and regens every 15 minutes and gives me the game score, would I need to put the leader board in the group too?
Zonix
#703644Friday, April 04, 2008 1:25 AM GMT

Hmmm...
Weyugioh
#703654Friday, April 04, 2008 1:27 AM GMT

you would need a leaderboard if you whant the game score...if you didn't there is no way to keep score of the K.O.'s/W.O.'s/ or whatever
Zonix
#703889Friday, April 04, 2008 1:58 AM GMT

Yeah. I thought so , I'm going to test it out now. -Thanks
Zonix
#704780Friday, April 04, 2008 6:26 AM GMT

Nope, not working. =/
Zonix
#708701Friday, April 04, 2008 11:43 PM GMT

Hmm...Does anyone have a working one?
Zonix
#715753Saturday, April 05, 2008 10:15 PM GMT

I found one, but it is not working, can I send it to one of you so you can see what's wrong?
Zonix
#715786Saturday, April 05, 2008 10:20 PM GMT

100 tix reward.
banyu
#715940Saturday, April 05, 2008 10:41 PM GMT

while true do wait(60) -- replace 60 with the amount of time in seconds you want waited local parent = script.Parent local h = Instance.new("Message") h.Parent = game.Workspace h.Text = "Regening map" wait(2) h:remove() parent:clone().Parent = game.Workspace parent:remove() end
Zonix
#716293Saturday, April 05, 2008 11:33 PM GMT

But I also need it to give me a points total.
Zonix
#716620Sunday, April 06, 2008 12:18 AM GMT

This is not my script, but for example where do I put it and what do I need to get it to work? local game_length = 300 -- every X seconds, end the game, show a message, regen the map, rebalance teams, cause MASSIVE LAG local red_stuff = game.Workspace.RedTeamRegen:clone() local blue_stuff = game.Workspace.BlueTeamRegen:clone() message = nil function showMessage(text) -- This function flashes a message to all players -- Clear the message with hideMessage() hideMessage() -- Never show more than one message at a time if message == nil then message = Instance.new("Message") end -- only make a message if we don't have a message object lying around message.Text = text message.Parent = game.Workspace end function hideMessage() if message == nil then return end message.Parent = nil end function RegenRed() game.Workspace.RedTeamRegen:remove() local new_stuff = red_stuff:clone() new_stuff.Parent = game.Workspace new_stuff:makeJoints() end function RegenBlue() game.Workspace.BlueTeamRegen:remove() local new_stuff = blue_stuff:clone() new_stuff.Parent = game.Workspace new_stuff:makeJoints() end function clearPlayerInfo() -- resets KOs and WOs local players = game.Players:children() for i = 1, #players do if (players[i]:findFirstChild("leaderstats") ~= nil) and (players[i].leaderstats.KOs ~= nil) then players[i].leaderstats.KOs.Value = 0 end if (players[i]:findFirstChild("leaderstats") ~= nil) and (players[i].leaderstats.Wipeouts ~= nil) then players[i].leaderstats.Wipeouts.Value = 0 end end end function getWinnerInfo() -- returns a string that we display to everyone about who the winner is -- in case of tie, no one wins. if someone wants to code something better, be my guest. local highscore = 0 local winner = "No one" local tie = false local players = game.Players:children() for i = 1, #players do local pscore = -1 if players[i]:findFirstChild("leaderstats") ~= nil then if players[i].leaderstats.Points ~= nil then pscore = players[i].leaderstats.Points.Value end end if pscore == highscore then tie = true end if pscore > highscore then -- new highscore highscore = pscore winner = players[i].Name tie = false end end if tie == true then return "Tie game!" end local text = string.format("%s %s %d %s", winner, "wins with", highscore, "points!") return text end function getWinningTeamString() local red = 0 local blue = 0 local p = game.Players:children() for i=1,#p do if (p[i].TeamColor == game.Teams:findFirstChild("Allies").TeamColor) then if (p[i]:findFirstChild("leaderstats") ~= nil and p[i].leaderstats.KOs ~= nil) then blue = blue + p[i].leaderstats.KOs.Value end end if (p[i].TeamColor == game.Teams:findFirstChild("Axis").TeamColor) then if (p[i]:findFirstChild("leaderstats") ~= nil and p[i].leaderstats.KOs ~= nil) then red = red + p[i].leaderstats.KOs.Value end end end if (red == blue) then return "Teams Tie!" end if (red > blue) then return string.format("Red won the match by %d points!", red - blue) end return string.format("Blue won the match by %d points!", blue - red) end while true do wait(game_length - 30) showMessage("30 seconds left until end of game!") wait(5) hideMessage() wait(25) -- put up winning team info showMessage(getWinningTeamString()) wait(2) RegenRed() RegenBlue() showMessage("Rebalancing teams and launching new game...") wait(5) clearPlayerInfo() game.Teams:rebalanceTeams() hideMessage() end
Zonix
#716802Sunday, April 06, 2008 12:44 AM GMT

Please, anyone?
LarryZ
#716837Sunday, April 06, 2008 12:48 AM GMT

I'm still new at the whole scripting thing, but if I tried hard enough I could read it... but are there SUPPOSED to be 2 equal signs in a row like that? That doesn't seem like it would do any good..
Zonix
#716857Sunday, April 06, 2008 12:50 AM GMT

I don't know. =(
Zonix
#718515Sunday, April 06, 2008 10:09 AM GMT

Help?

    of     1