Discuss Scratch

XxShazammxX
Scratcher
100+ posts

Scrolling Platformer Level Clones

Hello,
I am making a Scrolling Platformer.
This is the code in the level Sprite:

However, because of the forever loop in the “When I Start as a Clone” script, the levels appear on top of eachother.
Is there anyway to prevent this from happening?
Thanks
openPoll
Scratcher
1000+ posts

Scrolling Platformer Level Clones

XxShazammxX wrote:

Hello,
I am making a Scrolling Platformer.
This is the code in the level Sprite:

However, because of the forever loop in the “When I Start as a Clone” script, the levels appear on top of eachother.
Is there anyway to prevent this from happening?
Thanks
I think it's because you are trying to go off-screen - and to my knowledge, you can't do that. Try setting the x to -240 before cloning
XxShazammxX
Scratcher
100+ posts

Scrolling Platformer Level Clones

openPoll wrote:

snip
I don't actually think that's why; Levels in Scrolling Platformers always go off screen.
openPoll
Scratcher
1000+ posts

Scrolling Platformer Level Clones

Also, they are (probably) all going to the same place since there is nothing to check what costume is being used
XxShazammxX
Scratcher
100+ posts

Scrolling Platformer Level Clones

Bump.
openPoll
Scratcher
1000+ posts

Scrolling Platformer Level Clones

All the clones are actually going to the same location - you need to make a variable that tells clones apart
XxShazammxX
Scratcher
100+ posts

Scrolling Platformer Level Clones

openPoll wrote:

All the clones are actually going to the same location - you need to make a variable that tells clones apart
I'll see if that works.
games-void-2
Scratcher
14 posts

Scrolling Platformer Level Clones

think [ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt(rrrrrrrrrrrrrrrrrrr)] for (foo) secs
games-void-2
Scratcher
14 posts

Scrolling Platformer Level Clones

my barriers
when green flag clicked
forever
if <key [a v] pressed?> then
move (4) steps
if <touching color [#c3ed18] ?> then
move (-4) steps
end
end
end
games-void-2
Scratcher
14 posts

Scrolling Platformer Level Clones

when green flag clicked
point in direction (((() - (0((((((((((((((((((((((((((((((((((((((((((((((((((((((((((() - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)) - (0)))) - (0)) v)
games-void-2
Scratcher
14 posts

Scrolling Platformer Level Clones

define walk
forever
if <(direction) = []5000> then
change [your mom v] by (0)
say [yay!] for (2) secs
if on edge, bounce


else
set [not lisin v] to [100000000000000]

when green flag clicked
forever
if <key [q v] pressed?> then
say (your mom) for (2) secs

Last edited by games-void-2 (May 3, 2020 19:16:55)

RL1123
Scratcher
1000+ posts

Scrolling Platformer Level Clones

No spam please…
GuineaGod
Scratcher
500+ posts

Scrolling Platformer Level Clones

games-void-2 wrote:

define walk
forever
if <(direction) = []5000> then
change [your mom v] by (0)
say [yay!] for (2) secs
if on edge, bounce


else
set [not lisin v] to [100000000000000]

when green flag clicked
forever
if <key [q v] pressed?> then
say (your mom) for (2) secs

Please stay on topic

Powered by DjangoBB