Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » [URGENT] How do you randomise sprites
- 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!
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
I need help for an assessment and I need to know how to randomise an sprite so random tips come out in my gameBy random tips, I assume a random string of text is picked and said by the sprite.
Thanks Everyone!
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)
- Discussion Forums
- » Help with Scripts
-
» [URGENT] How do you randomise sprites