Discuss Scratch

  • Discussion Forums
  • » Help with Scripts
  • » I am making a top down scrolling game. I have different sprites for enemy objects and buildings how do I make them disapear when they go off screen? [RSS Feed]
bigbrianman
Scratcher
100+ posts

I am making a top down scrolling game. I have different sprites for enemy objects and buildings how do I make them disapear when they go off screen?

I want to make it so objects disappear when they go ofscreen, but right now I just have it so there x and y pos is checked, and if it is on the edge measurements it hides, but that is extremly choppy. How do I do it better?
deck26
Scratcher
1000+ posts

I am making a top down scrolling game. I have different sprites for enemy objects and buildings how do I make them disapear when they go off screen?

Scratch likes to keep things on screen but you can override this by increasing the size of the sprite before moving it to a new position and then resetting the size to what you want. https://scratch.mit.edu/projects/419039062/
bigbrianman
Scratcher
100+ posts

I am making a top down scrolling game. I have different sprites for enemy objects and buildings how do I make them disapear when they go off screen?

deck26 wrote:

Scratch likes to keep things on screen but you can override this by increasing the size of the sprite before moving it to a new position and then resetting the size to what you want. https://scratch.mit.edu/projects/419039062/

Thank you so much! I really apreciate you helping me out.

My only question is, is this actually moving the images off screen? If so will that be slow on a lower end computer because it has to compute more? Is there a way to make it hide once it is fully offscreen and would that help with lag?
  • Discussion Forums
  • » Help with Scripts
  • » I am making a top down scrolling game. I have different sprites for enemy objects and buildings how do I make them disapear when they go off screen? [RSS Feed]

Powered by DjangoBB