Discuss Scratch

Elemental4526
Scratcher
4 posts

How to make disappearing platforms

I'm trying to add disappearing platforms into my platformer, but I can't figure out how to make them. Can someone please tell me how?
MineTurte
Scratcher
500+ posts

How to make disappearing platforms

Elemental4526 wrote:

I'm trying to add disappearing platforms into my platformer, but I can't figure out how to make them. Can someone please tell me how?
Here ya go:
(code for platforms)
when I receive [ create platform]
create clone of [ myself]

when I start as a clone
go to x: (pick random (-150) to (150)) y: (0) //This is where the platform will appear, you can change it to whatever you'd like
wait until <touching [ player] ?>
repeat (50)
change [ ghost] effect by (1)
end
delete this clone

Hope this helps!

(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













SpyCoderX
Scratcher
100+ posts

How to make disappearing platforms

MineTurte wrote:

Elemental4526 wrote:

I'm trying to add disappearing platforms into my platformer, but I can't figure out how to make them. Can someone please tell me how?
Here ya go:
(code for platforms)
when I receive [ create platform]
create clone of [ myself]

when I start as a clone
go to x: (pick random (-150) to (150)) y: (0) //This is where the platform will appear, you can change it to whatever you'd like
wait until <touching [ player] ?>
repeat (50)
change [ ghost] effect by (1)
end
delete this clone

Hope this helps!
If there is already a disappearing platform when you broadcast “create platform” 2 will be created, not just one

New game! (link)
Have a good day/night!


\(-_-) ::#00AAAA //This is crypto. He protects my signature from the evil kumquats!
Programming is a very powerful skill. As are critical thinking and hard work.
- SpyCoderX


Elemental4526
Scratcher
4 posts

How to make disappearing platforms

I was hoping more of the platform would be set on a timer, like every few seconds it would disappear and the player would fall through it and then it would reappear and you could hop right back on it again
-TUB-
Scratcher
100+ posts

How to make disappearing platforms

Depends on how your platformer works. If collisions are detected using the touching blocks, you can make the platform either a clone of the main ground sprite or a separate sprite, and have it hide every so often. If your platformer uses some other type of collisions, you could have a timer and only draw the platforms and check collisions with them when the timer is in a certain interval.

- T U B -
The United Bathtubs


Select part of my signature and use shift+down arrow to see the rest





Powered by DjangoBB