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

#1 2008-04-19 16:07:33

MiniWolf
Scratcher
Registered: 2008-04-19
Posts: 1

How to make sprites dissapear?

For a short story project I'm working on, I need a sprite to dissapear when it changes scenes. How do I go about making it move off screen? I've tried having it move 1,000 steps so it should in theory go off screen but it doesn't.

Help? D:


- The girl who creates unnecessarily long "short" stories -
.:: Just a girl and her daemon, making their way through life. ::.

Offline

 

#2 2008-04-19 18:51:48

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

Re: How to make sprites dissapear?

Yeah, you can't make them move off the screen entirely.  Instead, use the "Hide" block under the "Looks" tab.  If you want them to come back, use the "Show" block.


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

Offline

 

#3 2008-05-06 02:54:16

prasannab
Scratcher
Registered: 2008-05-06
Posts: 2

Re: How to make sprites dissapear?

I want to bring my sprite back to its old position after trying out a new position. How ???

Offline

 

#4 2008-05-06 03:45:57

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: How to make sprites dissapear?

prasannab, before moving your sprite to the new position, remember the old/current one by storing it into a set of variables, e.g. like this:

[blocks]
<set{ oldX }to( <x position>
<set{ oldY }to( <y position>
<set{  oldDir }to( <direction>
[/blocks]

If you want your sprite to come back to this position afterwards, you can just reverse the code like this:

[blocks]
<go to x sad  <{ oldX }> )y sad  <{ oldY }>
<point in direction( <{ oldDir }>
[/blocks]

Does this answer your question?


Jens Mönig

Offline

 

#5 2008-05-06 06:53:40

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: How to make sprites dissapear?

Jens wrote:

prasannab, before moving your sprite to the new position, remember the old/current one by storing it into a set of variables, e.g. like this:

[blocks]
<set{ oldX }to( <x position>
<set{ oldY }to( <y position>
<set{  oldDir }to( <direction>
[/blocks]

If you want your sprite to come back to this position afterwards, you can just reverse the code like this:

[blocks]
<go to x sad  <{ oldX }> )y sad  <{ oldY }>
<point in direction( <{ oldDir }>
[/blocks]

Does this answer your question?

That's the same as my undoing project!


~ihaveamac - visit ihaveamac.net

Offline

 

#6 2008-05-06 09:52:34

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: How to make sprites dissapear?

<set[ Ghost ]effect to( 100

"Set Ghost Effect to 100" is in the "looks" tab, "Ghost" is in a drop-down menu.

Last edited by jamie (2008-05-06 09:53:39)


Check out my flash game site at http://subgaming.net/

Offline

 

#7 2008-05-06 11:52:06

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: How to make sprites dissapear?

jamie wrote:

<set[ Ghost ]effect to( 100

"Set Ghost Effect to 100" is in the "looks" tab, "Ghost" is in a drop-down menu.

I prefer to use show/hide as ghost effect slows your game.


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#8 2008-05-06 12:02:16

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How to make sprites dissapear?

Yeah. Why don't you just use hide/show blocks?

Offline

 

#9 2008-05-06 19:54:54

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: How to make sprites dissapear?

prasannab wrote:

I want to bring my sprite back to its old position after trying out a new position. How ???

here's what you should do:
put the sprite in the place you want it to be before it moves around. Then give it these scripts:
<when green flag clicked>
<go to x sad  0 )y sad  0

<when I receive[ move around
<go to x sad  17 )y sad  -5

<when I receive[ go back
<go to x sad  0 )y sad  0

but change the x and y positions to what you want

Last edited by funkymonkey (2008-05-06 19:55:22)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#10 2008-05-06 19:56:11

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: How to make sprites dissapear?

MiniWolf wrote:

For a short story project I'm working on, I need a sprite to dissapear when it changes scenes. How do I go about making it move off screen? I've tried having it move 1,000 steps so it should in theory go off screen but it doesn't.

Help? D:

<when green flag clicked>
<show>

<when I receive[ scene 2
<hide>


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

Board footer