Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make disappearing platforms
- Elemental4526
- Scratcher
7 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
Here ya go: 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?
(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!
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- SpyCoderX
- Scratcher
500+ posts
How to make disappearing platforms
If there is already a disappearing platform when you broadcast “create platform” 2 will be created, not just oneHere ya go: 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?
(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!
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
7 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.
- Discussion Forums
- » Help with Scripts
- » How to make disappearing platforms