Pages: 1
Topic closed
1.) How can I make it so when the main sprite gets to a certain area on the screen it switches to another background?
2.) How can I have different scripts for different things? For example, so I can use the left arrow key for different things, it just depends on what screen you're on. Also, i can't figure out how to have a sprite on just one page, so they're there only on one screen.
3.) How can I create walls so my character can't go beyond a certain area on [some] of the screens?
Thanks in advance!
Offline
1) In the sprite:
when <greenflag>
wait until <touching color ___> (or whatever your test for switching is)
broadcast change_background and wait
On the stage:
when I receive change-background
next background
2) There is no way to *detect* which background you are using (which is too bad---it has been suggested as an improvement to scratch). Instead you have to have an all-sprites variable (say "level")
On the stage:
when I receive change-background
change level by 1
set background to <level>
In the sprites you can test what level you are on to determine what a key does.
Last edited by kevin_karplus (2007-10-13 11:34:29)
Offline
For 3), look through the forum---that question has been asked and answered many times.
Perhaps the threads for it should be bumped to the FAQ forum, if they haven't been already.
Offline
Topic closed
Pages: 1