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 » Scripters
Home Search
 

Re: can u guys help me with my flood/seed fill script

Previous Thread :: Next Thread 
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
03 Jun 2015 06:22 PM
SO WHAT IT'S SUPPOSED TO DO IS
FILL IN THE AREAS I SELECT WITH A COLOR

INSTEAD WHAT HAPPENS IS
ALL THE PIXELS OF THAT COLOR CHANGE INTO THE COLOR I WANT
INSTEAD OF JUST A SMALL AREA

IT DOESN'T STOP THERE, AS IT LAGS THE SERVER TO DEATH EVEN AFTER IT RUNS

SEE FOR YOURSELVES
http://www.roblox.com/games/187361696/ROBLOX-Paint-xuerwasd#!/game-instances

function fill(frame,bcolor)
local frameX = 0
local frameY = 0
local frame1 = nil
for i=1,#frames do
if frames[i][1]==frame then
frameX=frames[i][2]
frameY=frames[i][3]
frame1=i
end
end
repeat wait() until frame1
for i=1,#frames do
if frame1 then
print("jesus christ does this work")
if frames[i][2]==frames[frame1][2]+1 and frames[i][1].BackgroundColor3==bcolor then
frames[i][1].BackgroundColor3=color
fill(frames[i][1],bcolor)
print("filled")
elseif frames[i][2]==frames[frame1][3]+1 and frames[i][1].BackgroundColor3==bcolor then
frames[i][1].BackgroundColor3=color
fill(frames[i][1],bcolor)
print("filled")
elseif frames[i][2]==frames[frame1][2]-1 and frames[i][1].BackgroundColor3==bcolor then
frames[i][1].BackgroundColor3=color
fill(frames[i][1],bcolor)
print("filled")
elseif frames[i][2]==frames[frame1][3]-1 and frames[i][1].BackgroundColor3==bcolor then
frames[i][1].BackgroundColor3=color
fill(frames[i][1],bcolor)
print("filled")
end
end
end
end
Report Abuse
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
03 Jun 2015 06:40 PM
OR IF U PREFER THIS (its the same thing)

function fill(frame,bcolor)
local frameX = 0
local frameY = 0
local frame1 = nil
for i=1,#frames do
if frames[i][1]==frame then
frameX=frames[i][2]
frameY=frames[i][3]
frame1=i
end
end
repeat wait() until frame1
for i=1,#frames do
if frame1 then
--print("jesus christ does this work")
if (frames[i][2]==frames[frame1][3]-1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][2]==frames[frame1][2]-1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][2]==frames[frame1][3]+1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][2]==frames[frame1][2]+1 and frames[i][1].BackgroundColor3==bcolor) then
frames[i][1].BackgroundColor3=color
fill(frames[i][1],bcolor)
print("filled")
end
end
end
end
Report Abuse
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
03 Jun 2015 06:53 PM
bump
Report Abuse
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
03 Jun 2015 08:57 PM
bump
Report Abuse
5GJ is not online. 5GJ
Joined: 29 May 2015
Total Posts: 59
03 Jun 2015 09:01 PM
Idk = print("I don't know")
Report Abuse
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
03 Jun 2015 09:10 PM
@5GJ
how would that work?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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