This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-07-14 11:14:14

DoowNimajneb
New Scratcher
Registered: 2012-06-27
Posts: 65

HELP, DUE IN MONDAY!!! Individual broadcasts

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

 

#2 2012-07-14 11:22:25

1s1sKing
New Scratcher
Registered: 2012-07-12
Posts: 30

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

I'm sorry DoowNimajeb (Benjamin Wood?), but thats not very clear. If you could clarify what you want to do, and maybe upload what you have so far, I may be able to help.

Offline

 

#3 2012-07-14 11:57:24

DoowNimajneb
New Scratcher
Registered: 2012-06-27
Posts: 65

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

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!  sad ... 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!  smile
PLEASE HELP

Offline

 

#4 2012-07-14 11:59:43

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

Use variables.


http://i47.tinypic.com/2iaa73k.png

Offline

 

#5 2012-07-14 12:01:06

DoowNimajneb
New Scratcher
Registered: 2012-06-27
Posts: 65

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

how?
Can you show me or give me some examples?

Offline

 

#6 2012-07-14 12:36:00

Nathanator1416J
Scratcher
Registered: 2012-02-21
Posts: 100+

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

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


http://wiki.scratch.mit.edu/images/Ptp.gif PEPPERTREE  Productions (PtP)
Tourmaline Scientific Research Programs

Offline

 

#7 2012-07-14 12:41:16

DoowNimajneb
New Scratcher
Registered: 2012-06-27
Posts: 65

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

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...   hmm

Offline

 

#8 2012-07-14 13:01:35

DoowNimajneb
New Scratcher
Registered: 2012-06-27
Posts: 65

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

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...     sad  :\

Offline

 

#9 2012-07-15 03:48:40

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

personally doownimajneb, i think you are making to difficult of games for yourself, maybe try researching other games, as for now, i'll take ANOTHER look  smile


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#10 2012-07-15 04:37:23

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: HELP, DUE IN MONDAY!!! Individual broadcasts

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.
Also, this code could be done far better with lists of x and ys

Last edited by zammer990 (2012-07-15 04:37:55)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer