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

#1 2010-12-09 17:44:16

FlyingHatTrick
Scratcher
Registered: 2010-12-08
Posts: 100+

Fading In

Okay, I'm having a bit of a problem. I have a sprite hidden, but I want it to fade in to the scene. How do I do this? Does it have something to do with the ghost effect?


http://img818.imageshack.us/img818/6352/fatedstars.png

Offline

 

#2 2010-12-09 17:52:16

ESN
New Scratcher
Registered: 2010-12-03
Posts: 100+

Re: Fading In

Yes; you would tell it to set ghost effect to 100, then tell it to change the ghost effect by 25 4 times using a repeat loop.


http://is.gd/jZ5chhttp://is.gd/jZhXDhttp://is.gd/jZhU7

Offline

 

#3 2010-12-09 18:34:06

FlyingHatTrick
Scratcher
Registered: 2010-12-08
Posts: 100+

Re: Fading In

Er... can you show the script? It doesn't seem to be working for me.

Here's what I have:

[blocks]
<when I receive[Show Game]>
<set[ ghost ]effect to(100)>
<repeat(4)
<change[ ghost ]effect by(-25) >[/block]

Is there anything wrong with it?


http://img818.imageshack.us/img818/6352/fatedstars.png

Offline

 

#4 2010-12-09 19:00:29

StrykerV
New Scratcher
Registered: 2010-06-15
Posts: 51

Re: Fading In

Try This:
<hide>
<set[ ghost ]effect to( 100
<show>
<repeat( 25 (you can change this just make sure this # * the repeating # = -100)
<change[ ghost ]effect by(-4 (depending on how high this # is, you may want to put a wait (secs) block.


99.9999% Crazy, 0.0001% Hamburgeh Makeh  smile

Offline

 

#5 2010-12-09 19:21:32

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Fading In

It could be hidden behind some other blocks. Try using the
[blocks]<go to front> [/blocks]
block.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2010-12-09 19:24:40

StrykerV
New Scratcher
Registered: 2010-06-15
Posts: 51

Re: Fading In

Harakou wrote:

It could be hidden behind some other blocks. Try using the
[blocks]<go to front> [/blocks]
block.

He said he used the "hide" block. I think he just forgot to put in the "show" block, so they would see the sprite appear.


99.9999% Crazy, 0.0001% Hamburgeh Makeh  smile

Offline

 

#7 2010-12-09 19:52:34

ESN
New Scratcher
Registered: 2010-12-03
Posts: 100+

Re: Fading In

Ah, I see. There is a big difference between 100% of ghost effect and the 'hide' block.

See, an image effect (color, ghost, etc.) only changes the appearance of the sprite; not the sprite itself. A max ghost effect only makes the sprite transparent; the sprite can still be felt by other sprites and will be as active as if there was no ghost effect.

Now, a hide block pulls the sprite off the radar; it cannot be felt by other sprites and cannot be seen either.

You can, however, use the hiding sprite to change variables, broadcast things, etc. You can also change the ghost effect while the sprite is hidden.

Here are the scripts you might want:

Code:

http://i54.tinypic.com/jzgm4n.png
http://i53.tinypic.com/2igc3mp.png

(I apologize for the inconvenience, New Scratchers can't use images.)


http://is.gd/jZ5chhttp://is.gd/jZhXDhttp://is.gd/jZhU7

Offline

 

#8 2010-12-09 22:50:12

FlyingHatTrick
Scratcher
Registered: 2010-12-08
Posts: 100+

Re: Fading In

Ah... I see what you mean... so basically, I have to set the sprite on show straight off the bat, and use the ghost effect to hide it instead of using the hide command?

Thanks for helping me~ I tried it, and it worked! ^^;

((And I'm a she... It's okay if you confuse genders... I don't mind.))


http://img818.imageshack.us/img818/6352/fatedstars.png

Offline

 

#9 2010-12-10 16:41:48

ESN
New Scratcher
Registered: 2010-12-03
Posts: 100+

Re: Fading In

You're welcome! I am also a she  tongue


http://is.gd/jZ5chhttp://is.gd/jZhXDhttp://is.gd/jZhU7

Offline

 

Board footer