Pages: 1
Hello All!
I am making Pacman and I am about done with it, yet I just need to tweak one minor detail. I have walls in my game but I can't seem to find the right script to make the pacman stop when it gets to the wall. ie. it passes through the wall. Please note that one side of my wall is the edge, yet one side is not part of the edge.
Offline
Well, i cant really offer a solution because I am wondering about the same thing, you see, i too am going to make a pacman game, and i need to know this info.
I can guess though, and my guess is that you either use the
touching [wall v]or
color [#00FF00] touching [#00FF00]or you use a completely ghosted sprite that has a
if < touching [wall v]> endI hope that helps or a least offers some options,
Offline
Another question,
How did you make the pellets?
That's my biggest question right now,
Regards,
CAA14
Offline
Say your character moves 10 steps if the D key is pressed, put another IF block inside that IF; saying IF touching colour (of wall) move -10 steps etc. Hope this helped :-)
Offline
Thanks. Yeah, I tried that and it helps.
To CAA14, sorry I couldn't get back to you earlier, I was in school. By the pellets, I just painted the sprites black and I got the maze online . I think only your second option works since I tried the others.
Offline
Ok, that's good to know.
Glad i could help.
You did apply the "if touching wall" script to pacman right?
If so, that should work as long as the wall is a separate sprite... But if you got the maze as a whole sprite, you may want to make the wall lines a distinct color and use the color approach or try to recreate the wall in it and make it a separate sprite and use the "if touching" approach.
Once you get it working, please let me know... I'd like to see your handiwork.
BTW, no problem, you had no time limit to respond.
Regards,
CAA14
Offline
Pages: 1