Discord
Login
Community
DARK THEME

Help anything please.

  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/

I can't see where you are setting up these "red", "purple", and "orange" objects. Make sure you are copying all of the code you wanted to show. Or better yet, make the project public and share a link. I just tried what you have here and the blue object did appear for me. Are you sure you created a sprite called "blue"?

https://microstudio.io/P1X3L_2012/bounce/9DHRX2RH/

I don't know why but it won't appear for me.

Copy the link under the "make public" section of the "publish" tab. It should say "public link". The link you shared is for playing the game, we need to see the code to help you.

Do the sprites exist in the sprites tab. If yes, are they in any folder?

https://microstudio.io/i/P1X3L_2012/bounce/

Yes they are in a folder.

Nevermind for some reason the copy I made work so I will just transfer my work to the copy thanks to everyone who sent me help.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community