Discuss Scratch

Spiderweb121
Scratcher
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?
jokebookservice1
Scratcher
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:

(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
Scratcher
85 posts

How do make a random number generator to choose the winning object or decide what it does?

jokebookservice1 wrote:

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.
I've got the act of randomly choosing which person to target and the the number, but how do I compare their numbers?
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)

Powered by DjangoBB