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?

id: 749478

category: Help with Scripts

posts: 3

bigbrianman bigbrianman loading
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 deck26 loading
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 bigbrianman loading

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?