I need help with my game I'm making, its called Marble Runners. First you need to control your ball to the end of the level, maneuver it around obstacles, roll over checkpoints and roll on the green pad to the next level. Some obstacles will be like tightrope, lava, moving spikes, and lightning and so on. There's over 20 levels. There's a high score screen and score. How do you make the game like the rolling cube one? How did someone make the checkpoints, the block, its movements, the interior, the exterior, the spikes, the moving platform, the finish line, and the storyline? I looked on all of the video tutorials and none of had what i needed to know! Only one did but when i tried it, it didn't work! Someone please tell me how to make my game!
Offline
I don't know how to make multiple levels. I searched and searched and searched for hours and they didn't have the information i needed to know! I watched a video of how to make a simple dot and make it move, this is what i did exactly as the video said and it didn't work:<when green flag clicked>set points to 0<forever><point towards( mouse-pointer)<go to pick random x:(230) y -230) to x
-161) y:(161) <if sprite2 is touched> change points by 1. It didn't work instead the dot disappeared! I need help. SERIOUS HELP.
Offline
1. To make multiple levels, create a variable. (preferably levels)
2. Make it so when it (the object you control, the "player" touches something (sprite or color, preferabbly color, so it can be on the backround) it changes level by one.
3. Insert a script into the backround like this: Forever(change backround to level)
4. Make multiple backrounds for different levels.
5. If any sprites need to do certain things on certain levels, put a script in it like this: Wait until(level = _____)-then __________
6. Finally, insert movement scripts into the player sprite, this is simple just put it like this: When Green Flag Pressed-Forever If(key right arrow pressed) change X position by 5. (five is optional, choose any number)
7. Dulplicate this script, and then modify it so it does the same for left key, right key, up, and down.
8. Now that the sprite can move, you need some final adjustments. Make it so if it touches the color (or sprite) that brings it to the next level, make it go back to a certain position. This can be made simply with this: When Green Flag Pressed-Forever If(touching color _____-Go To x____y____.
9. Now add any finishing touches, if you want something that kills you (color red for example) all you need is the same script in level eight, with the color that kills you, of course.
If you have any questions on this scripting, please ask me.
Offline
Let me move this to All About Scratch...that's where problems with your scripts are typically discussed.
Levels can be made a couple of ways...one way is to use a variable as discussed above. Another way is to use Broadcast Messages. Here's a little demo program that shows the use of Broadcast Messages - they are really handy. You might want to download it and play around with it.
http://scratch.mit.edu/projects/keithbraafladt/94289
Offline
Since I'm not going to explain the whole process, this is it, basically.
You want a variable to store the current level. Then you want the stage to "forever" change the background to match the level variable. So basically, if you change the level variable, the background will change correspondingly. Then, on the sprite/color/whatever you use for the "door"/checkpoint/finish line/etc you want it to change the level variable by 1 when the main sprite/character/etc touches it.
In simple terms:
Character touches door
Door changes variable
Background changes into correct costume
Move Character back to start point
Hope this helped!
Last edited by fg123 (2010-12-20 01:59:20)
Offline