Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Ghosts, Power dots and Linking both together - Pacman.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Please will someone help me with this, I can't seem to do it. You guys got any ideas
- drmcw
-
1000+ posts
Ghosts, Power dots and Linking both together - Pacman.
If the power dots are sprites then when pacman is touching power dot then you need to tell the ghosts to change to a “run away” mode by either changing a variable or broadcasting an event. If you do a search there are articles describing how the original pacman ghosts worked and the ideas are relatively easy to implement in Scratch although by no means a beginners project.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Thank you for the tip. I'll see how it goes. If the power dots are sprites then when pacman is touching power dot then you need to tell the ghosts to change to a “run away” mode by either changing a variable or broadcasting an event. If you do a search there are articles describing how the original pacman ghosts worked and the ideas are relatively easy to implement in Scratch although by no means a beginners project.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Guys, if any of you don't mind could you make a short youtube video\walkthrough on a video file to show me how to do it. It would be a great help.
Many thanks,
jackycarson.
Many thanks,
jackycarson.
Last edited by jackycarson (June 15, 2013 23:13:45)
- mitchboy
-
1000+ posts
Ghosts, Power dots and Linking both together - Pacman.
Yep. It definitely isn't a beginner's project. I started a project in computers class before I even joined here and it still isn't done. If the power dots are sprites then when pacman is touching power dot then you need to tell the ghosts to change to a “run away” mode by either changing a variable or broadcasting an event. If you do a search there are articles describing how the original pacman ghosts worked and the ideas are relatively easy to implement in Scratch although by no means a beginners project.
Anyway, I will post a picture of the scripts with notes on the side soon. Just give me a couple minutes.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Thanks, that would be a great helpYep. It definitely isn't a beginner's project. I started a project in computers class before I even joined here and it still isn't done. If the power dots are sprites then when pacman is touching power dot then you need to tell the ghosts to change to a “run away” mode by either changing a variable or broadcasting an event. If you do a search there are articles describing how the original pacman ghosts worked and the ideas are relatively easy to implement in Scratch although by no means a beginners project.
Anyway, I will post a picture of the scripts with notes on the side soon. Just give me a couple minutes.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Please could you hurry.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
If anyone else can help me before mitch can please do.
- turkey3
-
1000+ posts
Ghosts, Power dots and Linking both together - Pacman.
As mentioned above, when power dots are touched a variable must be set or broadcast to signal the ghosts to move in a direction away from pacman. How can this be done? If the y position of pacman is less than the y position of the ghost, the ghost will want to move up, so you can use an if statement to first off make it so
You can also try adding in more scripts so if pacman's x position is less than the ghost's, the ghost moves right. So you can program it so wherever pacman is in relation to the ghost, the ghost moves in the cardinal direction(s) away from pacman, as long as there is no restricting blue wall. Hope I helped some 
if <([y position] of [pacman]) < (y position)>
if <can move up> //I'm not sure how your motion sensing is done
change y by (3)

- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
If any of you have done this project before and have got the ghosts to work with the powers than I not really good at trying to work off word, I would prefer you you guys have the time to have a video walkthrough, I prefer this as it is easy to understand and I can follow where I am on it, I just fine it easier. SO if you guys don't mind could you make a video walkthrough.
Many thanks,
jackycarson
PS. Thanks for trying to help me so far guys I'm just stupid and don't understand.
.
Many thanks,
jackycarson
PS. Thanks for trying to help me so far guys I'm just stupid and don't understand.
.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Thanks very much with the help so far guys.
- jackycarson
-
11 posts
Ghosts, Power dots and Linking both together - Pacman.
Could you guys make either a video walk through or a picture as I find it easier to follow then you guys just telling me what to do. So, If you guys have the time please could you do a video walk through or a picture.
Many thanks,
jackycarson
Many thanks,
jackycarson
- Discussion Forums
- » Help with Scripts
-
» Ghosts, Power dots and Linking both together - Pacman.