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

#1 2012-06-02 08:13:41

GeekyChick21
New Scratcher
Registered: 2012-06-01
Posts: 2

New to scratch and need help urgently!!

Hi, I am new to scratch and have recently learnt the basics in school. I
am creating my game now and am a bit stuck with one of the elements I want to create. I am basically creating a pac-man influenced game and I have these little stars that give points and I also have a finish point! But I don't want the finish point to appear till all the stars are collected.. What do I need to do??
Thanks, GeekyChick21 xxx

Offline

 

#2 2012-06-02 09:14:24

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: New to scratch and need help urgently!!

You should make a variable called StarsCollected. Then, each time a star is collected, the variable goes up by one. Once the variable gets to a certain number (and all the stars are eaten), you could broadcast ShowFinishStar, which would cause the last star to show. It would look something like this:

when gf clicked
forever
  if <(Pacman)touching (star)>
    change (StarsCollected) by (1)
when gf clicked
wait until <(StarsCollected)=(number of stars)>
broadcast [ShowFinishStar]

Last edited by WingsGames (2012-06-02 09:15:16)


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#3 2012-06-02 09:33:49

PhirripSyrrip
Scratcher
Registered: 2012-02-11
Posts: 100+

Re: New to scratch and need help urgently!!

For Pacman;

when gf clicked
forever
if <touching color [#FFFA61] ? >//colour of stars
change [StarsCollected v] by [1]
change [score v] by [1]
For the Finish Star
when gf clicked
hide
forever
if <(StarsCollected)=[however many stars there are]>
show


http://i46.tinypic.com/ao03lk.png

Offline

 

Board footer