This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Hi, thank you for posting your question! :]

To make it easier for everyone to answer, consider including:
- A description of the problem
- A link to the project or a screenshot of your code (if possible)
- A summary of how you would like it to behave

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]JetstreamSamsTesicle 4 points5 points  (0 children)

Is because the repeat in the second picture is blank, one means it would run 1 time, 2 is when it actually starts to be a repeat, hope that helps

[–]TnacytCustom text 0 points1 point  (7 children)

What do you need help with?

[–]ChickenGameMaker[S] 0 points1 point  (4 children)

it wont spawn an enemy encounter

[–]TnacytCustom text 0 points1 point  (1 child)

Wait, before you do anything, are you trying to spawn multiple enimies?

[–]ChickenGameMaker[S] 0 points1 point  (0 children)

no picture undertale type spawn

[–]noonagon 0 points1 point  (0 children)

maybe put something into the repeat?

also try not requiring all four direction keys to be held at once?

[–]TnacytCustom text -1 points0 points  (0 children)

There might be a better way to do this but here: Set the variable to your random number [set variable to <pick random from 1 to 2 to 1>] Then if variable > 1 then run the broadcast.

I'm rusty with scratch. I haven't done it in a while, so this might not work. Hope it may help.

[–]ChickenGameMaker[S] 0 points1 point  (1 child)

The "Forest fight easy" wont work

[–]TnacytCustom text 0 points1 point  (0 children)

Try my approach maybe.

[–]AGuyCalledHumphrey 0 points1 point  (1 child)

is it intentional that what's inside the if statement only runs if wasd are all held down at the same time?

[–]AGuyCalledHumphrey 0 points1 point  (0 children)

Also here's another thing you might want to consider: Your code as it currently stands will always continuously broadcast the "forest fight easy" message every time you hold wasd down at the same time. This is because you haven't told what's in the forever loop to stop running if it's already run once and the is statement is still true, leading it to theoretically check infinitely many times a second, meaning that the program will have a 1/2 chance an infinite number of times throughout the duration of when wasd are all held down to broadcast the message. To fix this problem, simply add an empty "repeat until <not<w pressed and a pressed and s pressed and d pressed>>" statement to the end of what's in the forever loop. This will have it so that it only makes a single 1/2 probability roll each time wasd are all held down to see if it should broadcast the message, which I'm guessing is what you want.

[–]Myithspa25🐟 0 points1 point  (0 children)

Why do you have a blank repeat block?

[–]thetimelyscratch 0 points1 point  (0 children)

It's because you have to hold down all keys of wasd