player = object end
player.x = 0
player.y = 0
player.speed = 4
//pixels per frame
blue = object
x = 0
y = 50
end
end
update = function()
//player movement
if keyboard.RIGHT then
player.x += player.speed
end
if keyboard.LEFT then
player.x -= player.speed
end
player.x =clamp(player.x, -160,160)
player.y =clamp(player.y, -80,80)
end
draw = function()
screen.clear()
//sets up screen
screen.drawMap("map"0,0,450,230)
screen.drawSprite("block", player.x, player.y-75, 40,40)
screen.drawSprite("blue", blue.x, blue.y+50,30,30)
screen.drawSprite("red", red.x-150, red.y,30,30)
screen.drawSprite("purple", purple.x+150, purple.y+70,30,30)
screen.drawSprite("orange", orange.x-100, orange.y+30,30,30)
end
Please if anyone can help fix this code I would appreciate this very much.The problem is that the sprites that are blue, red, orange, purple aren't appearing in my game. Please any help immediately would be great thanks.
Here is the link, also the red blue, and orange things are in my brick breaker games, but probably should've named it better. https://microstudio.io/P1X3L_2012/bounce/9DHRX2RH/