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

#1 2008-10-13 14:24:58

sonic2000
Scratcher
Registered: 2008-07-21
Posts: 26

i want my sprite to disappearslowly.

how do you make a sprite slowly disappear. this is an example of  what i did.

<say[ hello ]for( 2 )secs>
<change[ ghost ]effect by( 100

Last edited by sonic2000 (2008-10-13 14:26:50)


i like video games and scratch!

Offline

 

#2 2008-10-13 15:10:18

dsdude10
Scratcher
Registered: 2007-09-22
Posts: 500+

Re: i want my sprite to disappearslowly.

do
[blocks]<repeat( 25 )
<change[ ghost ]effect by( 4 )
<end>[/blocks]
and to make it fade in again put
[blocks]<repeat( 25 )
<change[ ghost ]effect by( -4 )
<end>[/blocks]

Offline

 

#3 2008-10-13 15:30:02

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

Re: i want my sprite to disappearslowly.

Actually, I find a much more efficient method to be
repeat 10
change [ghost] effect by 10
hide
set ghost effect to 0

This makes it less slow because the ghost effect seems to slow Scratch down quite a bit. By hiding the sprite and then resetting the ghost effect it doesn't use the ghost effect forever.

If you want to make it disappear slower still, just change the repeating number and ghost effect change to whatever you like as long as the repeat by multiplied by the change effect by equals 100. For example:

repeat 50
change ghost effect by 2
hide
set ghost effect to 0

Last edited by coolstuff (2008-10-13 15:30:50)

Offline

 

#4 2008-10-13 15:52:46

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: i want my sprite to disappearslowly.

Basically all you do is use a repeat block to increase the ghost effect until it reaches 0 or lower. The above examples are good. It doesn't really matter what numbers you put in as long as the ghost number is 0 or less in the end. Different numbers will only affect the rate at which the sprite disappears.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-10-13 16:27:11

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

Re: i want my sprite to disappearslowly.

archmage wrote:

Basically all you do is use a repeat block to increase the ghost effect until it reaches 0 or lower. The above examples are good. It doesn't really matter what numbers you put in as long as the ghost number is 0 or less in the end. Different numbers will only affect the rate at which the sprite disappears.

You mean, repeat it until it reaches 100 or higher.

Offline

 

Board footer