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
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)
Offline
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
Offline