** So, i would like my code to have the clouds generated randomly on screen 4 but i messed it up and it went all wierd. here is my code:**
--[[ Screens:
1: Menu
2: Credits
3: Stats
4: Loading
--]]
function setup()
displayMode(FULLSCREEN)
-- screens
screen = 4
cloudx = 1
-- timer for the loading bar
ltimer = 0
loadingbackground = color(0, 236, 255, 255)
end
-- This function gets called once every frame (Yes, we know)
function draw()
cloudx = cloudx + 1
-- Start the loading timer
ltimer = ltimer + 1 * DeltaTime
if ltimer > 5 then
screen = 1
end
-- Draw Screens
if screen == 4 then
background(loadingbackground)
for i = 1,100 do
sprite("Platformer Art:Block Grass",i * 100,0,100)
end
for i = 1,100 do
sprite("Platformer Art:Block Grass",i * 50,0,100)
end
for i = 1,100 do
sprite("Platformer Art:Cloud 1",i * cloudx,500,300)
end
font("Futura-CondensedExtraBold")
fill(0, 0, 0, 255)
fontSize(120)
textWrapWidth(700000)
text("Crafty World", WIDTH/2, HEIGHT/1.5)
end
end