Discuss Scratch

zelda_universe
Scratcher
100+ posts

How to Move objects in a scrolling game independentely

I have made a game
https://scratch.mit.edu/projects/199728577/
Can any one suggest me how can i move the turtle as in the real mario game series
mstone326
Scratcher
1000+ posts

How to Move objects in a scrolling game independentely

You'll first have to code the sprite of your turtle and not use the levels with the turtle on it then switch to the level sprite without the turtle after collision. Place your turtle sprite the same method you placed your level sprites. scrollX + location.

You can then set your conditions for the collision with your controlled sprite. Assume the turtle has 2 costumes, one with head out (costume1) and one with head in (costume2). If touching the controlled sprite and costume # = 1, set gravity to 5 (to make your guy bump), switch to costume2. If touching controlled sprite and costume # = 2, set gravity to 5, point it in the direction of the main sprite and repeat moving until you touch the edge.

Edit:
I made this project a few years ago that has examples of different Mario enemy types in a scrolling world. This will help with the movement.
https://scratch.mit.edu/projects/108361157/

Last edited by mstone326 (Feb. 23, 2018 15:15:26)


High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
zelda_universe
Scratcher
100+ posts

How to Move objects in a scrolling game independentely

Thank you very much
mstone326
Scratcher
1000+ posts

How to Move objects in a scrolling game independentely

Good luck on your project. I did make a remix of your with what you were asking. If you get stuck let me know and I will share it.

High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
zelda_universe
Scratcher
100+ posts

How to Move objects in a scrolling game independentely

Of course
zelda_universe
Scratcher
100+ posts

How to Move objects in a scrolling game independentely

I have tried it out but it stops at the edge. (Does not go out of the screen)
How to do it??
mstone326
Scratcher
1000+ posts

How to Move objects in a scrolling game independentely

Here is the remix. I am away from my laptop so I can't see your scripts. I will look when I get back.


https://scratch.mit.edu/projects/205817581/

Last edited by mstone326 (Feb. 24, 2018 12:14:33)


High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335

Powered by DjangoBB