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)
Offline
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
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
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.
Offline
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