Hi, I'm using a key to play a animation of a walkthougt, I'm using "next costume" to play one frame after another everytime the key is pressed, I want to know if there is something like "previous costume" or how to create the effect of play the animation reversed when another key is pressed.
Thanks in advance.
Jaceguay Zukoski
Offline
Hrmm,
Sadly, there is no 'Previous Costume' block, but I may have an idea that might work.
Step 1: Name all your costumes of the sprite, in order, from 1 to, lets just say 100
Step 2: Make a Variable called 'Costume' for example. And set it's value to the first costume. So if the first costume is called '1', set value of Costume to 1
Step 3: In the coding for the 'Next' key. Make it so when it's pressed, increases 'Costume' Variable by 1, and get the 'switch to costume' block and drag the 'costume variable' into the drop down box.
Step 4: In the coding for the 'Previous' key. Do the same as above but chance costume by -1.
Test it out. This should work.
If you have any problems and want me to make some screenshots or a sample program, just post here.
Offline
There *used to be* a "change costume by ___" block, which they replaced by the less flexible "next costume" to make things simpler for beginners. It took me a long time to realize that "set costume" accepted numbers. I thought they had restricted things to just named costumes. I think it was clearer before with the "change costume by __" block, but I'm not really the target audience.
Offline