This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » New Scratchers
  •  » How can i make a sprite stay put, and move by it's self, on scrolling?

#1 2008-12-30 09:27:41

Ilovejesus
Scratcher
Registered: 2008-12-06
Posts: 13

How can i make a sprite stay put, and move by it's self, on scrolling?

I'm trying to make a kind of tycoon game. The button to start keeps on staying on the screen, where it's not supposed to be, and the (i'm not going to tell you) ????? doesn't go through the tube, with the same problem of the button. is there anyway how to fix this?

Offline

 

#2 2009-01-01 11:24:31

djmoomoo
Scratcher
Registered: 2007-08-31
Posts: 57

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

Maybe a little more explanation?
If your button doesn't scroll, just put a little:

repeat until 'buttonisactive' = 0
    go to x:0 y:0


There are 0011 types of people, those that can count in binary and those that can't.

Offline

 

#3 2009-01-01 12:14:32

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

Ilovejesus wrote:

I'm trying to make a kind of tycoon game. The button to start keeps on staying on the screen, where it's not supposed to be, and the (i'm not going to tell you) ????? doesn't go through the tube, with the same problem of the button. is there anyway how to fix this?

I think I know what you mean. The sprite is staying on the edge of the screen when it isn't supposed to. This is a problem with scratch, but the best way to overcome this is to create a sprite which just covers the edges of the screen, making the screen smaller but getting rid of this problem.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#4 2009-01-02 09:08:49

Ilovejesus
Scratcher
Registered: 2008-12-06
Posts: 13

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

djmoomoo wrote:

Maybe a little more explanation?
If your button doesn't scroll, just put a little:

repeat until 'buttonisactive' = 0
    go to x:0 y:0

Thanks sooooooooo much! you fixed my button problem! all i need is to do now is fix my ????? problem.

Offline

 

#5 2009-01-02 09:19:53

Ilovejesus
Scratcher
Registered: 2008-12-06
Posts: 13

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

Ilovejesus wrote:

djmoomoo wrote:

Maybe a little more explanation?
If your button doesn't scroll, just put a little:

repeat until 'buttonisactive' = 0
    go to x:0 y:0

Thanks sooooooooo much! you fixed my button problem! all i need is to do now is fix my ????? problem.

Shoot. Cross that.  sad

Offline

 

#6 2009-01-03 12:48:33

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

It's impossible, because in scrolling the BACKGROUND moves, not the sprite.  smile
Happy Scratch-ing!


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#7 2009-01-27 20:55:30

Ilovejesus
Scratcher
Registered: 2008-12-06
Posts: 13

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

pokemon_master12 wrote:

It's impossible, because in scrolling the BACKGROUND moves, not the sprite.  smile
Happy Scratch-ing!

Really? i've done a couple of Scrollers and the backround doesn't move. at all. u can look into it.  wink

Offline

 

#8 2009-01-29 06:26:05

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

Well scrolling is where the background moves. The sprite just looks like it's moving because the background is moving and it is pointing in the direction the background is moving in. And by the way, it is possible to make the sprite go through the tube AND make the button hide once it's pressed.

To make the ??????? go through the tube, you have to put this script:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if>[/blocks][blocks]<touching[ tube[/blocks]
[blocks]<hide>[/blocks]
[blocks]<end>[/blocks]

That way, (if you add a "forever if not touching tube, show" script) whenever it's touching the tube, it will disappear into it, and whenever it's not, it will show itself like it's coming out of the tube.

To make the button disappear once it's pressed, just add this:

[blocks]<when[ button ]clicked>[/blocks]
[blocks]<hide>[/blocks]

or this:

[blocks]<when[ button ]clicked>[/blocks]
[blocks]<broadcast[ start game ]and wait c>[/blocks]

[blocks]<when I receive[ start game[/blocks]
[blocks]<hide>[/blocks]

Then your game will be fixed!
Happy Scratch-ing!  smile


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#9 2009-02-22 07:39:31

Ilovejesus
Scratcher
Registered: 2008-12-06
Posts: 13

Re: How can i make a sprite stay put, and move by it's self, on scrolling?

Hey! I made a demo of my game! Check it out! It's called Donut Tycoon Demo. Now do u see what the ????? is?

Offline

 
  • Index
  •  » New Scratchers
  •  » How can i make a sprite stay put, and move by it's self, on scrolling?

Board footer