Discuss Scratch

Eevee__Larsonn_NYEH
New Scratcher
1 post

[URGENT] How do you randomise sprites

I need help for an assessment and I need to know how to randomise an sprite so random tips come out in my game

Thanks Everyone!
RokCoder
Scratcher
1000+ posts

[URGENT] How do you randomise sprites

Share the work you've done towards this assessment and someone will likely offer some guidance.
T_om
Scratcher
19 posts

[URGENT] How do you randomise sprites

Eevee__Larsonn_NYEH wrote:

I need help for an assessment and I need to know how to randomise an sprite so random tips come out in my game

Thanks Everyone!
By random tips, I assume a random string of text is picked and said by the sprite.
Below should work well for you.

delete (all v) of [phrases v]
add [Phrase 1] to [phrases v]
add [Phrase 2] to [phrases v]
add [Phrase 3] to [phrases v]
say (item (pick random (1) to (length of [phrases v] :: list)) of [phrases v] :: list)

Or, if you mean pick a random costume for the sprite,

switch costume to (pick random (1) to (4))

Change the second number of the pick random block to the amount of costumes your sprite has.

Last edited by T_om (Nov. 9, 2018 18:01:41)

Powered by DjangoBB