OK, I'm making a carnival game in scratch, and I;m having trouble at making some broadcasts only happen after other things have happened. 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 want my coin to go to one of 5 wall sprites, by clicking on them. But, I'm having trouble getting the walls to broadcast at the right time.
This is because, at the start of my game, you choose between 3 coin shooters (with coins in them) and continue to do so after every turn for the rest of my game. BUT, when you click a shooter, if I broadcast just a normal broadcast like come to wall 1, all the coins would come, so I need seperate broadcasts (I think, please tell me if there is another way) and I don't know how to! ... PLEASE HELP!!! URGENT!!!
Once again, what I think I need to do is:
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"
If you can think of another way, please post!!
I will be happy to answer any definite solutions, possible solutions, questions, problems or anythig else!
PLEASE HELP
Offline
how?
Can you show me or give me some examples?
Offline
well if you make a variable for each sprites piece of data that needs to be communicated, and change them before you broadcast it would work fine.
Kind of like in this game:
http://scratch.mit.edu/projects/Nathanator1416J/2490384
Offline
can you tell/show me in the forum pages as for some reason my computer wont let me download projects. Also, can you try and make it easier to understand as I dont...
Offline
Please help, this project is due in on monday, and its urgent because I cant move on with my project until I find a solution to this... :\
Offline
when I receive [1 v] if <(clicked) = (1)> //set the variable with the "clicked" hat block. broadcast [gotowall1 v] set [clicked v] to (0) when I receive [gotowall1 v] go to [wall 1 v] // or glide //etc when [shooter1] clicked broadcast [1 v]Personally, I agree with the above, you've posted about this a lot.
Last edited by zammer990 (2012-07-15 04:37:55)
Offline