Discuss Scratch

1234goofyhere
Scratcher
53 posts

how do i make a randomly generated room? and a hit box for this game.

i making a game where you go through these vents and they are randomly generated but it just keeps glitching https://scratch.mit.edu/projects/893889509/ also need help with a hitbox script for a game here https://scratch.mit.edu/projects/824421123/ hit box not working out there the randomizer switchs fast and when i add waits it just bug out when i use a another sprite to make it look like character is moving but that makes it buggy as well keep retrying but wont work just need help on how to make it so it dont like switch fast

Last edited by 1234goofyhere (Sept. 15, 2023 13:38:28)

1234goofyhere
Scratcher
53 posts

how do i make a randomly generated room? and a hit box for this game.

i am gonna wait for a reply sense i really need it right now
zedero
Scratcher
29 posts

how do i make a randomly generated room? and a hit box for this game.

bro, you have no code
1234goofyhere
Scratcher
53 posts

how do i make a randomly generated room? and a hit box for this game.

oh i posted a old version of the project my bad
1234goofyhere
Scratcher
53 posts

how do i make a randomly generated room? and a hit box for this game.

zedero wrote:

bro, you have no code
i am gonna update it real quick sense its wrong version
Tanuki-T
Scratcher
30 posts

how do i make a randomly generated room? and a hit box for this game.

just realized i already answered this

For the random generation. This should work.

whenIreceivegenerateifpickrandom1to3=1thensetroomto1broadcastgenerateventelseifpickrandom1to3=2thensetroomto2broadcastgenerateventelseifpickrandom1to3=3thensetroomto3broadcastgeneratevent

For the hitbox, I have no clue unfortunately.

Last edited by Tanuki-T (Sept. 15, 2023 14:24:10)

Rocketpowered12
Scratcher
100+ posts

how do i make a randomly generated room? and a hit box for this game.

Tanuki-T wrote:

just realized i already answered this

For the random generation. This should work.

whenIreceivegenerateifpickrandom1to3=1thensetroomto1broadcastgenerateventelseifpickrandom1to3=2thensetroomto2broadcastgenerateventelseifpickrandom1to3=3thensetroomto3broadcastgeneratevent

For the hitbox, I have no clue unfortunately.

I'm thinking you can resort to having the entire room be a certain color and detect if the player's hitbox is touching that color. There is a block in scratch dedicated to that. You have to switch to the player's hitbox costume, detect, and switch back.

touchingcolor?

Powered by DjangoBB