How do I Pacman

Get help using Construct 2

Post » Tue Mar 01, 2016 2:36 am

Hello, I'm having to make a Pac-Man clone for an assignment at my school. I have pretty much everything worked out the way I'd like except for the ghosts' movement. The only problem with their movement that I know of is that with the way I have it set up, sometimes when they collide with the maze they are supposed to choose a new direction and sometimes will choose the same direction they were already going and phase through the maze if that makes any sense. If anyone could help me out with this in any way I'd greatly appreciate it as I'm almost done with it.

Edit: I just realized I can't post URLs so it'll take a moment but I'll try to write out what the problem is and see if I can make it understabdable
B
3
Posts: 3
Reputation: 181

Post » Tue Mar 01, 2016 2:43 am

I gave the ghost the bullet behavior and told it that whenever it collides with the maze to pick 0, 90, 180, or 270 and set it as the bullet's angle of motion, but like I said above, sometimes it will mess up and they will phase through the maze. Of course if this doesn't make enough sense or I didn't explain it well enough just say so and I'll see if I can do better.
B
3
Posts: 3
Reputation: 181

Post » Tue Mar 01, 2016 6:50 am

not quite sure if this will help, But have you tried

if angle = 0 (then pick 90,180,270)
if angle = 90 (then pick 0,180,270)
if angle = 180 (then pick 0, 90,270)
if angle = 270 (then pick 0, 90,180)

edit: also use marker blocks top,bottom,right,left if overlapping top on collision with right angle go down or left (pick 180,270) and so on. so not to get stuck in a corner just going top and right.

As we can not see what you have done it is hard to point you in the right direction, without guessing at the issues you are having.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Tue Mar 01, 2016 8:13 am

TheJester98 wrote:Hello, I'm having to make a Pac-Man clone for an assignment at my school. I have pretty much everything worked out the way I'd like except for the ghosts' movement. The only problem with their movement that I know of is that with the way I have it set up, sometimes when they collide with the maze they are supposed to choose a new direction and sometimes will choose the same direction they were already going and phase through the maze if that makes any sense. If anyone could help me out with this in any way I'd greatly appreciate it as I'm almost done with it.

Edit: I just realized I can't post URLs so it'll take a moment but I'll try to write out what the problem is and see if I can make it understabdable


Maybe the following tutorial could help you out:

https://www.scirra.com/tutorials/308/cloning-the-classics-pacman

Also, it's possible to bypass the url posting restriction by simply inserting characters into the url, or missing off the http:// part, e.g.

Code: Select all
http*://*www.mysite.com/mygame.capx
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,374
Reputation: 58,430

Post » Tue Mar 01, 2016 12:10 pm

Message: TheJester98 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
zenox98 wrote:Maybe the following tutorial could help you out:

https://www.scirra.com/tutorials/308/cl ... ics-pacman

Also, it's possible to bypass the url posting restriction by simply inserting characters into the url, or missing off the http:// part, e.g.

Code: Select all
http*://*www.mysite.com/mygame.capx


Thank you for this useful information.
https*://*www.dropbox.com/s/ktf884jobl6jrtv/Pacman.capx?dl=0

Carbincopy wrote:not quite sure if this will help, But have you tried

if angle = 0 (then pick 90,180,270)
if angle = 90 (then pick 0,180,270)
if angle = 180 (then pick 0, 90,270)
if angle = 270 (then pick 0, 90,180)

edit: also use marker blocks top,bottom,right,left if overlapping top on collision with right angle go down or left (pick 180,270) and so on. so not to get stuck in a corner just going top and right.

As we can not see what you have done it is hard to point you in the right direction, without guessing at the issues you are having.

I haven't tried this, but I will try it and report back if it has fixed my issue or not. Thank you for trying to help.
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: OddConfection, rengo, Snagator, Yahoo [Bot] and 34 guests