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
[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]

Offline
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
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?

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

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

Offline
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
use the variable method i gave you

Offline