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

#1 2012-11-02 22:06:08

eatingiceman
New Scratcher
Registered: 2012-11-02
Posts: 3

How to make sprite slowly appear.

I know that using the ghost effect can make a sprite slowly disappear and fade out, but is there a way to make a sprite slowly appear in the same manner? I want to make my sprite slowly appear when holding down a key.
Pretty much the opposite of the original ghost effect.
Thank you so much if you can help.

Offline

 

#2 2012-11-02 22:14:10

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: How to make sprite slowly appear.

using

change [ghost v] effect by [-1]
you can make it fade in (what you're asking for). if you change any of the effects by a negative number, they would move backward compared to putting in a positive number.

Offline

 

#3 2012-11-02 23:25:25

eatingiceman
New Scratcher
Registered: 2012-11-02
Posts: 3

Re: How to make sprite slowly appear.

That is what I'm asking, but that approach doesn't seem to work.
This is What I did.

when gf clicked
forever if <key [down arrow v] pressed?>
  change [ghost v] effect by (-1)

Offline

 

#4 2012-11-02 23:32:10

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: How to make sprite slowly appear.

eatingiceman wrote:

That is what I'm asking, but that approach doesn't seem to work.
This is What I did.

when gf clicked
forever if <key [down arrow v] pressed?>
  change [ghost v] effect by (-1)

Well, you have to have this:

when gf clicked
set [ghost v] effect to (100)
forever if <key [down arrow v] pressed?>
  change [ghost v] effect by (-1)
That way, it'll go from fully transparent (100) to non transparent (0). I could give you a more complicated script that would make it fade in then out then in then out, but I don't think you want that.

Offline

 

#5 2012-11-02 23:41:03

eatingiceman
New Scratcher
Registered: 2012-11-02
Posts: 3

Re: How to make sprite slowly appear.

Om my Gosh Thank youu! It worked and You might of just saved my project  smile
But if you don't mind one last question is there any way to make the effect more stable?
I mean it works, but it wont always go back to 0% transparency when holding down the button. If you hold down the button too long it will flicker between fully there and slightly transparent.

Offline

 

#6 2012-11-03 01:19:52

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: How to make sprite slowly appear.

eatingiceman wrote:

Om my Gosh Thank youu! It worked and You might of just saved my project  smile
But if you don't mind one last question is there any way to make the effect more stable?
I mean it works, but it wont always go back to 0% transparency when holding down the button. If you hold down the button too long it will flicker between fully there and slightly transparent.

I don't know why that would be happening, but you can do this (it'll not flicker)

when gf clicked
set [ghost v] to [100] //variable
set [ghost v] effect to [100]
forever
if <not<<(ghost)=[0]>or<(ghost) < [0] >>>
if <key [down v] pressed?>
change [ghost v] effect by [-1]
change [ghost v] by [-1]
else
set [ghost v] effect to [0] //scripts
set [ghost v] to [0] //scripts
end
and whenever you want to reset it, you just have another script that'll have this:
set [ghost v] to [100]
set [ghost v] effect to [100]
To check if it's your computer's problem, put the two blocks that have the comment "scripts" on them in the else, to check if it's your other scripts, take out the blocks that have the comment "scripts" on them.

If it's your computer's problem, I don't know what to tell you.

Offline

 

#7 2012-11-06 12:22:59

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: How to make sprite slowly appear.

when gf clicked
set [ghost v] effect to (100)
set [ghost v] to [100]
forever if <key [down arrow v] pressed?>
repeat until <(ghost) = [0]>
change [ghost v] effect by (-1)
change [ghost v] by (-1)
And whenever you need to reset it:
set [ghost v] effect to (100)
set [ghost v] to [100]


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#8 2012-11-06 12:31:44

FistofDeath
New Scratcher
Registered: 2012-10-12
Posts: 29

Re: How to make sprite slowly appear.

I usually use
repeat 100
change ghost effect by -1

Offline

 

#9 2012-11-06 14:41:51

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: How to make sprite slowly appear.

FistofDeath wrote:

I usually use
repeat 100
change ghost effect by -1

Yeah, that's what I usually use, too.


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

Board footer