Discuss Scratch

Quantum1993
Scratcher
500+ posts

Need Help with Random Events

I'm making a spy-themed game. Every time the player presses one of the action buttons, eventually players will get a message telling them if the action was successful. If it wasn't, they might get a game over.
I know how to randomize the result, but I need help with figuring out how to broadcast the randomized result to a message icon sprite, which shows the result when clicked.
scratch___user12345
Scratcher
1000+ posts

Need Help with Random Events

Just set a global variable to the result and then broadcast something like “Check Variable” and have the other sprite recieve it and check the variable and act on its value.
Quantum1993
Scratcher
500+ posts

Need Help with Random Events

Thanks

scratch___user12345 wrote:

Just set a global variable to the result and then broadcast something like “Check Variable” and have the other sprite recieve it and check the variable and act on its value.
.
benche1
Scratcher
100+ posts

Need Help with Random Events

when I receive [ action]
broadcast (pick random (1) to (chance of success))
All messages except 1 are useless.

Last edited by benche1 (Jan. 12, 2024 20:20:11)

Quantum1993
Scratcher
500+ posts

Need Help with Random Events

benche1 wrote:

when I receive [ action]
broadcast (pick random (1) to (chance of success))
All messages except 1 are useless.
That helps a lot!

Powered by DjangoBB