You know how when you do scrolling games, they are fine. But what about if you add enemies with sensors. My game, the enemy has a sensor on the bottom, but because it's out of the screen, it isn't working. And i also notice ALL the other scrolling sprites are sticking into the main screen at the wrong time (even in presentation), like forever you can see them. Fix this (it's a suggestion)
Offline
This happens a lot. If sprites go to far off the screen they will "stick" to the edge of the screen. I way to solve this is to make a command that hides the sprite when it is touching the edge. You could use something like
[blocks]<if><touching[edge]>
<hide>
<else>
<show>
<end>
Offline
Paddle2See wrote:
What's the link to your game?
I am actually going to post it now. It's Wilson's Twin Level 2. I have no Idea how it works because of this. I don't know what the enemies do because their sensors don't work in the Scratch screen because of this
Offline
This is a common problem in my scrolling games, you can either create a border around the edge which is what I use or do the show/hide thing suggested by Josh99 though this may look a bit strange if an enemy, especially a large one, is only just touching the edge and then suddenly vanishes.
If you want to make an enemy come into contact with something that is offscreen (for example the enemy is following you and you jump over a hole which he will fall in) the you can do:
[blocks]
<if><(<<<touching[Hole]><and><X of enemy - X of Hole>><<>22)>
<change y by( -10)>
[/blocks]
Where X is the Virtual X position of the main character (which you change when you make the scrolling background move) of the enemy or hole.
If this is too confusing (even I'm getting confused and I'm writing it!) then I will make an example project for you.
SB
Offline
Yes, I had to use these ways, but it actually still doesn't work since they still fall right through the ground (they need to sense it!)
Offline