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
Mar 22, 2024 17:51:30
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?
view on scratch
view on legacy ocular
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?
Mar 22, 2024 17:53:30
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?
view on scratch
view on legacy ocular
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/
Mar 22, 2024 18:00:46
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?
view on scratch
view on legacy ocular
bigbrianman
loading
https://scratch.mit.edu/projects/419039062/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.
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?