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

#1 2010-10-03 23:22:00

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

Stop changing score

Hi,
I am still on my game, and I am having a problem. The problem is that this is supposed to happen: Whenever you touch the train, the variable "score" increases by 10 if you got the ticket. I want it to continuously check, but only increase the score once, even if the player sprite stays there. Please help me make the score increase only once.


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 23:30:36

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

Re: Stop changing score

After the variable increases, put a "Wait until <not <touching train> >" block in there.


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

Offline

 

#3 2010-10-03 23:38:11

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

Re: Stop changing score

Wow, thanks! You know a lot!


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-06 08:52:06

platform710
Scratcher
Registered: 2010-04-23
Posts: 100+

Re: Stop changing score

lackofslackness wrote:

Hi,
I am still on my game, and I am having a problem. The problem is that this is supposed to happen: Whenever you touch the train, the variable "score" increases by 10 if you got the ticket. I want it to continuously check, but only increase the score once, even if the player sprite stays there. Please help me make the score increase only once.

If you touch the train you win, put a stop script. if you just get points, put change variable, and then a wait _ seconds until he moves away from the train. is that your question?


http://i54.tinypic.com/2wn8hnb.gif

Offline

 

Board footer