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

#1 2010-07-26 11:08:16

VIshiswoz
New Scratcher
Registered: 2010-07-26
Posts: 1

My "if" button is not working!!!

When I try to make my game, Pacman,  I try to make pacman eat the white circles so he turns blue so he can eat the ghosts, but for some directions it doesn't work but I did it right!!? Like right or left, when I make him go right, I eat a circle, but he stays yellow! When I try a different one, it works! WHAT DO I DO!!!!! (Special 1 is the circle he eats to turn blue)

The blocks I used:
  [blocks] <when[right arrow]key pressed>
<point in direction(90 degrees)
<move(3)steps>
<if><touching[special1]
-<change{change}by(1000)
<switch to costume[blue pacman]
<wait(15)secs>
<switch to costume[yellow pacman]
[/blocks]

This is what I did for all the specials (special1,2,3,and 4) and it only worked for one or two. (for every direction!) SOMEONE PLEASE HELP ME!!!! I DON'T KNOW WHAT'S WRONG!!!  yikes

Offline

 

#2 2010-07-26 11:26:48

JeanTheFox
Scratcher
Registered: 2010-06-14
Posts: 1000+

Re: My "if" button is not working!!!

Did you use color sensing for the ghosts to detect Pacman when he's blue?


http://i51.tinypic.com/20gcn5j.png

Offline

 

#3 2010-07-26 12:13:55

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

Re: My "if" button is not working!!!

Do the "special" dots have a script that hides them if they're touching Pac-man? If so, then they're probably hiding before your script can sense the contact. Try putting an empty repeat 1 block before the part of the script that hides the dots.  smile


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

 

Board footer