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

#1 2010-10-03 20:31:31

lackofslackness
Scratcher
Registered: 2010-09-27
Posts: 24

Linking Sprites

Hi,
I am making a game, and I'm having a bit of difficulty because there is a train, but you have to collect the train tickets to get on the train. I was wondering if it is possible to do this on Scratch v 1.4.

Thank you if you can help.


http://img709.imageshack.us/img709/3252/gobanim2.gif  http://img709.imageshack.us/img709/3252/gobanim2.gif  http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gif

Offline

 

#2 2010-10-03 20:41:06

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Linking Sprites

This is certainly possible. Have a variable, called something like "tickets" Then whenever a ticket is collected, change the variable by 1. When the player gets to the train, only allow them to board if the variable "tickets" is equal to the number needed.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-10-03 20:48:58

lackofslackness
Scratcher
Registered: 2010-09-27
Posts: 24

Re: Linking Sprites

Thanks! Now I can continue!


http://img709.imageshack.us/img709/3252/gobanim2.gif  http://img709.imageshack.us/img709/3252/gobanim2.gif  http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gifhttp://img709.imageshack.us/img709/3252/gobanim2.gif

Offline

 

#4 2010-10-03 20:54:11

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Linking Sprites

No problem!  smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2010-10-04 03:13:52

2l84zwamani
Scratcher
Registered: 2010-09-27
Posts: 100+

Re: Linking Sprites

You can also use broadcasting messages, so when you collect a ticket on Stage 1 it will broadcast "Ticket S1" and then for the train "When I receive Ticket S1 ~ When touching maincharacter ~ broadcast "go to stage 2 or i will murder you"". A more complicated alternative is (for the train)"When flag clicked switch to costume costume1 ~When I receive TicketS1 ~ switch to costume costume2 (#the same thing) ~ When touching maincharacter ~ if costume #=2 broadcast "go to stage 2 or i will murder you" else move 0 steps (or any other thing that doesn't affect anything)".  Broadcasting messages can also be used for switching stages, as in my example script.

Also, mwagwagwagwagwa I know what lackofslackness is creating! Because I spy on him!
__________________________________________(fake)
I will be a Great Person <forever>
... Dr Deadpebble, I presume?


I will be a Ms. Pickle Dr. Deadpebble Great Person <forever>
http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3 GROB THE SLIME WILL TAKE OVER THE WORLD!

Offline

 

Board footer