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

#1 2010-06-24 12:05:14

stickdude123
Scratcher
Registered: 2010-05-31
Posts: 100+

stop all problem

im making this game where there are these things u cant touch and if u do u die and i try this



<when green flag clicked>
<if><<touching[ obsticle
<stop all>
<end>

can someone hulp me?


http://internetometer.com/imagesmall/34259.png http://www.mediafire.com/convkey/418e/lkb7wmv2n2k73rz5g.jpg         http://blocks.scratchr.org/API.php?user=stickdude123&amp;action=onlineStatus&amp;type=square

Offline

 

#2 2010-06-24 12:12:49

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: stop all problem

Do this instead
<when green flag clicked>
<forever if><touching[ obstacle
<stop all>
<end>


http://i42.tinypic.com/2rot8c2.png

Offline

 

#3 2010-06-24 12:15:02

stickdude123
Scratcher
Registered: 2010-05-31
Posts: 100+

Re: stop all problem

coka wrote:

Do this instead
<when green flag clicked>
<forever if><touching[ obstacle
<stop all>
<end>

thanks dude! let me try!


http://internetometer.com/imagesmall/34259.png http://www.mediafire.com/convkey/418e/lkb7wmv2n2k73rz5g.jpg         http://blocks.scratchr.org/API.php?user=stickdude123&amp;action=onlineStatus&amp;type=square

Offline

 

#4 2010-06-24 12:19:44

stickdude123
Scratcher
Registered: 2010-05-31
Posts: 100+

Re: stop all problem

stickdude123 wrote:

coka wrote:

Do this instead
<when green flag clicked>
<forever if><touching[ obstacle
<stop all>
<end>

thanks dude! let me try!

OMG IT WORKS!!!!


http://internetometer.com/imagesmall/34259.png http://www.mediafire.com/convkey/418e/lkb7wmv2n2k73rz5g.jpg         http://blocks.scratchr.org/API.php?user=stickdude123&amp;action=onlineStatus&amp;type=square

Offline

 

#5 2010-06-24 13:14:34

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: stop all problem

Yes. Because your script only detects in a second. When green flag clicked, it sees if you are touching the obstacle. If it is, you die, if it isn't it stops everything. The suggested script repeats the detection forever. So thus, it works.  smile


Hai.

Offline

 

#6 2010-06-24 13:34:21

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: stop all problem

No problem  wink


http://i42.tinypic.com/2rot8c2.png

Offline

 

Board footer