This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-06-27 00:48:50

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Problem of some Magnitude

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)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#2 2008-06-27 06:00:28

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Problem of some Magnitude

What's the link to your game?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-06-27 07:12:19

Josh99
Scratcher
Registered: 2008-05-20
Posts: 37

Re: Problem of some Magnitude

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

 

#4 2008-06-27 15:35:06

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Problem of some Magnitude

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


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-06-27 18:49:39

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Problem of some Magnitude

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


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#6 2008-06-27 18:52:52

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Problem of some Magnitude

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!)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer