Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do make a random number generator to choose the winning object or decide what it does?
- Spiderweb121
-
85 posts
How do make a random number generator to choose the winning object or decide what it does?
So I want to try and make something choose between 1 and how ever many units there are.
After this, I want them to go for that sprite.
When they hit that sprite,
I want them both to basically roll a die and whoever gets the highest number wins.
How do I do this?
After this, I want them to go for that sprite.
When they hit that sprite,
I want them both to basically roll a die and whoever gets the highest number wins.
How do I do this?
- jokebookservice1
-
1000+ posts
How do make a random number generator to choose the winning object or decide what it does?
Ok, so the block below might help you:
It can be used to pick a random number for a die by setting the first circular input to 1 and the second one to 6.
(pick random () to ())
It can be used to pick a random number for a die by setting the first circular input to 1 and the second one to 6.
- Spiderweb121
-
85 posts
How do make a random number generator to choose the winning object or decide what it does?
I've got the act of randomly choosing which person to target and the the number, but how do I compare their numbers? Ok, so the block below might help you:(pick random () to ())
It can be used to pick a random number for a die by setting the first circular input to 1 and the second one to 6.
And how may I implement a health system?
Edit:
Nevermind. I don't even need to get any information from the other enemy, All I need is to set up 1 system and depending on the damage it takes, it will reduce the health. Thanks for triggering this information though! (Well, Helping)
Last edited by Spiderweb121 (Oct. 5, 2016 17:30:18)
- Discussion Forums
- » Help with Scripts
-
» How do make a random number generator to choose the winning object or decide what it does?