I am making a carnival game in scratch, and my problem is when I choose one of three shooter sprites and a coin inside it points towards the mouse pointer, you then click on one of five sprites (called 'walls') and it is supposed to glide towards it then point in a random direction then go forwards whichever way its facing.
I think I know how to do everything apart from how to make one of three coins to go to one of the 'walls' because I will probably have to use broadcasting (please let me know if there is another way), and I am struggling on what to do with it because if the wall broadcasts a load of things at once when it is clicked, all the coins will come to it so I need to know how to seperate the broadcasts and only broadcast a certain broadcast when a certain shooter has been clicked.
Once again, THIS IS DUE IN ON MONDAY SO PLEASE HELP!!
Please post if you dont understand, have a suggestion, have a definate solution or anything else, I will be happy to answer any questions as well!
Thanks again!,
DoowNimajneb
Offline
My problem is that I need to get my sprites to communicate with each other, basically, I want them to do this:
For shooter(s):
"when shooter (insert number here) clicked"
"broadcast (something)"
Then wall(s):
"When I recieve (something)"
"if I have been clicked"
"broadcast (something2)
For coin(s):
"when recieve (something2)"
"Glide to x:-240 y: -125"
This is what I want the sprites to do, I just dont know how to get them to do it because there will be 5 walls, 3 coins and 3 shooters and they all need their own coding, Please Help!!!
Offline
I haven't because as far as I know, there is no block that says "if I have been clicked" is there?
I am just looking for a replacement of this block (or if I'm wrong and its already there, please tell me!)
Offline
DoowNimajneb wrote:
I haven't because as far as I know, there is no block that says "if I have been clicked" is there?
I am just looking for a replacement of this block (or if I'm wrong and its already there, please tell me!)
It already is there, it is one of the 4 hats found in Control.
Last edited by SciTecCf (2012-07-08 13:11:49)
Offline
I can't use a hat because the 'if I have been clicked' block I mentioned is in the middle of a script and they don't fit I can't use them,
Please can you see if you can find an alternative to it?
Offline
when gf clicked forever if <<mouse down?> and <touching [mouse-pointer v]?>> wait (0.04) secs if <<not <mouse down?>> and <touching [mouse-pointer v]?>> set [clicked v] to [1] wait (0.001) secs set [clicked v] to [0] end endAnd this is the boolean you are gonna use:
<(clicked) = [1]>
Last edited by berberberber (2012-07-08 13:25:29)
Offline
Thanks berberberber, I think this will work and I understand the script, But, I have one question...
Which sprite do I put the first script in that starts with:
"When 'Green Flag' clicked
forever
if (mouse down?) and (touching mouse-pointer)
etc.
Once again,
Thanks berberberber, I think this will work and I understand the script, But, I have one question...
Which sprite do I put the first script in that starts with:
Offline