Discuss Scratch

Delta_Creator
Scratcher
12 posts

Add Checkpoints to my Scrolling Plarformer

Hello,
I m creating a scrolling platformer, and I would like to add checkpoints…
I don't know how to.

Please help me !!

Delta_Creator
deck26
Scratcher
1000+ posts

Add Checkpoints to my Scrolling Plarformer

I'm assuming you will have a set of checkpoints which you can effectively number so you can have a variable that records the current checkpoint number. You can then use that as a reference for values in a list or multiple lists to tell you where to go back to.

So for a horizontal scroller you probably need to store the relevant value of scrollx and perhaps the y position. Probably once scrollx has gone above the value stored you can increase the checkpoint number.

So let's assume you've passed checkpoint 5 which is identified in a list as item 5. Now if you exceed item 6 of the list you set the checkpoint value to 6 but if you need to return to the checkpoint you set scrollx to the value stored in item 5 and set y to item 5 in another list.
Mint-Kins
Scratcher
76 posts

Add Checkpoints to my Scrolling Plarformer

you can try checking the checkpoint codes here: https://turbowarp.org/569955829/fullscreen
(sorry it's glitchy so don't stick to corners when testing the checkpoints) :3

“Sayu, Shuumatsuban, at your disposal! Whew, but if you don't need me right now, I'm gonna grab some sleep. I need the extra room to grow into.”
Delta_Creator
Scratcher
12 posts

Add Checkpoints to my Scrolling Plarformer

thx, could you just help me on my project pls,
here it is : https://scratch.mit.edu/projects/504694329/
Thanks
Delta_Creator
Scratcher
12 posts

Add Checkpoints to my Scrolling Plarformer

@Mint-Kins How can we see the codes ?
maDU59_
Scratcher
59 posts

Add Checkpoints to my Scrolling Plarformer

if <(X) > [160]> then
set [checkpoint] to [1]
end

Last edited by maDU59_ (Oct. 1, 2021 08:55:39)


I make cools games!
You can see my games by clicking here!
when you see my games
Don't forget to leave a love and a fave
Mint-Kins
Scratcher
76 posts

Add Checkpoints to my Scrolling Plarformer

Delta_Creator wrote:

@Mint-Kins How can we see the codes ?
click see inside and go to checkpoint sprite :3

“Sayu, Shuumatsuban, at your disposal! Whew, but if you don't need me right now, I'm gonna grab some sleep. I need the extra room to grow into.”

Powered by DjangoBB