Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pick random x position
- malaika2001
-
36 posts
Pick random x position
I'm having trouble in pick random and 3 x positions. Can you help me in script?
The 3 x-positions are = -134,170 and 10 and there is a sprite of which i want to pick random from three of these x-positions.
Help me please!
The 3 x-positions are = -134,170 and 10 and there is a sprite of which i want to pick random from three of these x-positions.
Help me please!
- drmcw
-
1000+ posts
Pick random x position
Put the 3 coordinates in a list and use
To select a random of 3 sprites then create 3 new broadcast messages called maybe select1, select2 and select3 then use
To select a random of 3 sprites then create 3 new broadcast messages called maybe select1, select2 and select3 then use
- malaika2001
-
36 posts
Pick random x position
I mean there's a coin and there are 3 curtains. in first round coin is in middle curtain then in second curtain its in left curtain and so on…. so i want a script like that.
- drmcw
-
1000+ posts
Pick random x position
If you know where the coin is then its not random. If it is random then the broadcast is all you need. Perhaps sharing your project would explain the problem better?
- malaika2001
-
36 posts
Pick random x position
No i don't know where the coin is i want it to choose randomly from 3 x-positions. If you know where the coin is then its not random. If it is random then the broadcast is all you need. Perhaps sharing your project would explain the problem better?
- WoodenLaser
-
16 posts
Pick random x position
I think understand what you mean, the following code may help
Have fun coding!
Have fun coding!
Last edited by WoodenLaser (Nov. 2, 2014 06:13:55)
- malaika2001
-
36 posts
Pick random x position
Where will i find block random x position v ? I think understand what you mean, the following code may help
Have fun coding!
- malaika2001
-
36 posts
Pick random x position
Okay i got it thanks. We'll make a variable thanks! I think understand what you mean, the following code may help
Have fun coding!
- malaika2001
-
36 posts
Pick random x position
I coded it but it stays behind only one curtain.Okay i got it thanks. We'll make a variable thanks! I think understand what you mean, the following code may help
Have fun coding!
Here's what script i entered in that coin:
and then the script you've entered above.
Last edited by malaika2001 (Nov. 2, 2014 11:53:09)
- WoodenLaser
-
16 posts
Pick random x position
The backdrop only switches once as far as I can see, so you need to either switch the backdrop again to the same one to trigger this, or something like…
which is broadcast after one is clicked
- StarGjikolli
-
55 posts
Pick random x position
Same I'm having trouble in pick random and 3 x positions. Can you help me in script?
The 3 x-positions are = -134,170 and 10 and there is a sprite of which i want to pick random from three of these x-positions.
Help me please!
- StarGjikolli
-
55 posts
Pick random x position
Mine is a pick the cup game. I need the prize to go at one of 3 places: x:0 y:0,x:150 y:0 and x:150 y:0 I mean there's a coin and there are 3 curtains. in first round coin is in middle curtain then in second curtain its in left curtain and so on…. so i want a script like that.
- Cool_Dude2022
-
500+ posts
Pick random x position
Mine is a pick the cup game. I need the prize to go at one of 3 places: x:0 y:0,x:150 y:0 and x:150 y:0 I mean there's a coin and there are 3 curtains. in first round coin is in middle curtain then in second curtain its in left curtain and so on…. so i want a script like that.
Please do not necropost.
- StarGjikolli
-
55 posts
Pick random x position
Thx I think understand what you mean, the following code may help
Have fun coding!
- Discussion Forums
- » Help with Scripts
-
» Pick random x position