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

#1 2008-06-12 00:35:16

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

new Scratcher, need help with switching sprites

Hello all,

I'm building a simple program. A wand moved down to a test tube containing a chemical, and travels over to a flame burning. When the wand touches the flame, I want the flame to change color.

I have a script for the wand
Script for Flame, sprite for normal flame, sprite for colored flame.

I can't seem to get the flame to change color. ANY help is appreciated.

Thx,
Dutch

Offline

 

#2 2008-06-12 00:39:50

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: new Scratcher, need help with switching sprites

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><touching[ wand[/blocks]
[blocks]<switch to costume[ wand-toucher[/blocks]
[blocks]<end>[/blocks]
[blocks]<end>[/blocks]


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-06-12 01:35:56

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

Re: new Scratcher, need help with switching sprites

Thanks for the fast response. Let me add some info that I neglected!
Normal flame runs when  <when green flag clicked> and rotates 3 costumes to flicker using <forever>.

<when[  ]clicked>"G", the wand touches one object, then travels to the normal flame. I need to stop the normal flames and switch to different costumes/color flames. The normal flames keep running with the new costumes/flames. Hope this makes sense!

Offline

 

#4 2008-06-12 01:37:28

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: new Scratcher, need help with switching sprites

Umm.. not really. I don't know what your trying to do, and seeing you know how to use the blocks, can you use them (by pressing enter after each one to "stack: them) to show me?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-06-12 01:47:40

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

Re: new Scratcher, need help with switching sprites

I'll try....


<when green flag clicked>
<forever>
<wait(  )secsc>
<switch to costume[
<wait(  )secsc>
<switch to costume[


<when[  ]key pressed>
<forever>
<if><touching[ wand    (first set of flame/costumes needs to stop)
<wait(  )secsc>
<switch to costume[
<wait(  )secsc>

Offline

 

#6 2008-06-12 01:49:50

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: new Scratcher, need help with switching sprites

Hmm... Now, it looks like the wand will continue touching the flames? For the second one, try putting a  [blocks]<stop script>[/blocks]  at the bottom and see if it helps


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#7 2008-06-12 01:54:51

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

Re: new Scratcher, need help with switching sprites

The first set of flames/costumes will run indefinately UNTIL I press the letter "G" which starts the wand motion. The wand motion ends by touching the flame.

My problem seems to be how to get the first set of flickering flames to stop when the wand touches the flame. No problem getting the new color flames flickering.

Offline

 

#8 2008-06-12 02:00:55

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: new Scratcher, need help with switching sprites

Try variables. Make one called stop. Set it to 0 when green flag clicked. Now, if stop=0, the flames will continue to flicker. Just put there script inside this:

[blocks]<if><( <{ stop  }> <=> 0 )>
[blocks]<end>[/blocks]

Now, that tells them, if stop=0, to flicker. But when the wand touches the flame:

[blocks]<forever>[/blocks]
[blocks]<if><touching[ flame[/blocks]
[blocks]<set{ stop }to( 1[/blocks]
[blocks]<end>[/blocks]

So now, stop=1, and since the flames only flicker when stop equals 0, they won't flicker. Is this what you wanted?

Last edited by Bluestribute (2008-06-12 02:01:30)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#9 2008-06-12 02:09:09

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

Re: new Scratcher, need help with switching sprites

well, close I think. I want the first color (3 changing costumes) to change to a new color (3 changing costumes) when the wand touches the flame which is prompted by pressing a letter to start the wand motion.

I'm not describing this very well so I really appreciate your help.

Offline

 

#10 2008-06-12 02:11:46

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: new Scratcher, need help with switching sprites

use the variable method i gave you


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#11 2008-06-12 02:17:03

dutch
Scratcher
Registered: 2008-06-12
Posts: 7

Re: new Scratcher, need help with switching sprites

Dude! that's exactly the effect. Thanks a lot!!

Offline

 

Board footer