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

#1 2011-07-15 13:01:25

orion05010
New Scratcher
Registered: 2011-07-12
Posts: 9

Help!I'm new.I have a question.

hi~I come from Taiwan.(My english is poor.Hope you can understand what I said.><|||)
I'm a new user about Scratch.
I made a maze,you can find it by the under link.
http://scratch.mit.edu/users/orion05010

My question is "why the cat is in the black wall???" The cat should  step on white road.
Black color is maze wall.The ghost(dragon) I had let it not to move.
I had changed the distance that the cat touchs black walls  then bound,but the cat still walk walk walk(><|||) then stuck in the black wall.
WHY WHY WHY
please help me. Thank you.

Offline

 

#2 2011-07-15 13:10:01

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

Re: Help!I'm new.I have a question.

Ah, well your problem is that if it happens to be touching the wall when you change direction, it starts moving -2 steps in the wrong direction. For example, if it's moving up, stops at the wall, and is still touching the wall when you change to going, for example, right, instead of moving down away from the wall, the sprite moves -2 steps relative to its new direction, so it goes left. Does that make sense?


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 2011-07-15 13:16:40

Craigster001
New Scratcher
Registered: 2011-07-15
Posts: 5

Re: Help!I'm new.I have a question.

The new direction is different.

Peace out, and RAINBOOM AWAY!!!!!!!!!!!!!!!!!!!!

I really want a signiture.

Offline

 

#4 2011-07-15 13:28:50

orion05010
New Scratcher
Registered: 2011-07-12
Posts: 9

Re: Help!I'm new.I have a question.

Thanks for replys@@
now I konw the cat  direction is wrong.but I still don't know how to modify it.@@
I changes that it  starts moving 0 steps,it still struck in the black wall.
but I can't find "stop" command.@@
can you modify it and  post commnands on this.thanks.

Offline

 

#5 2011-07-15 15:10:14

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

Re: Help!I'm new.I have a question.

Hm, well for the most part, you can solve it by putting an if <not touching color black> script around each of the "point in direction" blocks, like so:

Code:

When key up arrow presssed
if <not <touching color black> >
    point in direction 0

Unfortunately, there are a few cases where this doesn't fix it completely. You can most definitely fix that with a sensor sprite, but that's a little complicated. Do you want to know how to do that?


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

 

#6 2011-07-16 12:35:10

orion05010
New Scratcher
Registered: 2011-07-12
Posts: 9

Re: Help!I'm new.I have a question.

Thank you,Harakou.
Yes,I want to know how to do that,but now I still don't solve the first Q.= neutral ||
According to your code,I modified it.@@Doesn't work.
Because there are many commands in that file,I'm not sure that I only make your code or should deconstruct the original commands.
(I tried many different situations: made your code ,
deconstruct or compose  the original commands,
even draw new background and new sprite, but..failed...><|||)
Could you modify the file and post on your stuff,I'll  be very thankful.
I can download it and study it. or mail to me.

~~Thank you!!!~~

Offline

 

#7 2011-07-16 13:10:28

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

Re: Help!I'm new.I have a question.

My first script was just an example of what you should do to all four scripts. Sorry for the confusion. Give me a minute and I'll upload the improved project and post the link here.

As I said before, a sensor sprite will completely resolve these problems, but that's a little more involved.


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

 

#8 2011-07-16 13:32:12

harakou_testing
New Scratcher
Registered: 2010-08-18
Posts: 2

Re: Help!I'm new.I have a question.

Harakou here on my test account. I've uploaded your project with the changes I made. You can find it at http://scratch.mit.edu/projects/harakou_testing/1926174. (Sorry for the plain text; this account isn't allowed to post links yet.)

Anyway, you can see I actually made a few more changes to the scripts than I originally indicated, although I have still only changed the four scripts that affect what happens when an arrow key is pressed. This seems to fix the problem 100% of the time now. I hope that helps you!

Offline

 

#9 2011-07-17 08:53:27

orion05010
New Scratcher
Registered: 2011-07-12
Posts: 9

Re: Help!I'm new.I have a question.

I saw it.Thanks for your help to fix it. smile

Offline

 

#10 2011-07-17 08:57:44

sci_test
Scratcher
Registered: 2011-06-22
Posts: 100+

Re: Help!I'm new.I have a question.

harakou_testing wrote:

Harakou here on my test account. I've uploaded your project with the changes I made. You can find it at http://scratch.mit.edu/projects/harakou_testing/1926174. (Sorry for the plain text; this account isn't allowed to post links yet.)

Anyway, you can see I actually made a few more changes to the scripts than I originally indicated, although I have still only changed the four scripts that affect what happens when an arrow key is pressed. This seems to fix the problem 100% of the time now. I hope that helps you!

Us newbies can post links to Scratch.

I played your game, orion05010, it seems to work.  smile


[signature removed - please be respectful]
Last edited by scimonster (1970-01-01 00:00:00)

Offline

 

#11 2011-07-24 16:30:10

KyleK7
Scratcher
Registered: 2011-06-14
Posts: 500+

Re: Help!I'm new.I have a question.

In case none of these answers work, use this:

[blocks]<if><touching color[ black]>


http://i46.tinypic.com/zwxnhh.gif

Offline

 

#12 2011-07-24 16:34:35

Funky7774
Scratcher
Registered: 2010-10-16
Posts: 18

Re: Help!I'm new.I have a question.

Craigster001 wrote:

I really want a signiture.

Just post 15 different replies to topics or topics themselves.


"The stars say you're an exciting and wonderful person, but you know they're lying."     Your Horoscope For Today by "Weird Al" Yankovic

Offline

 

Board footer