MillyLamp's Recent Forum Activity

  • I didn't expect you to do the work for me.

    I see you added a previous instance to the ghost.

    You added this code <abs(Ghost.X - Player.X) + abs(Ghost.Y - Player.Y) <= 96>

    Not sure what 96 was to mean.... but I think i get the gist of it...I change 96 to the grid size.

    but you did what I wanted to do, and had tried but you manage to make it work. I bow to you. Thank you!

    I had a lot of useless code that I used for other reason that I forgot to delete, which is why I attempted to set up a less messy file. lol I realize its still messy.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So I'm using EasyStarjs for tilemap for my pac man clone game. I got it to work, but i'm having trouble figuring out how to prevent the ghost from turning around. The system works fine. the ghost chase continuously, but I would like to prevent them from being able to change direction so immediately. Any ideas on how I could implement this?

    Ive tried setting the tile that the ghost is previously on to unwalkable or the cost to max. I cant seem to get it to work?

    There also seems to be a problem where the behavior cant choose between two paths with the same cost so it just goes through both.(In an attempt to recreate this problem. It seems that this has to do with the ghost attempting to change direction at a spit section. So I believe preventing the ghost from turning around will stop this issue.)

    I will be setting up a less messy file for sharing.

    Here is a link to the file dropbox.com/s/7v5hixv0c90xx2n/Pacman%20test.capx

  • Thanks for the reply... I managed to figure out the problem. I started out creating my layouts without event sheets and chose to add them when I needed them. I had no problem with the first two but it seemed the third event sheet did not want to pair with the third layout...

    I'm sad to say I assumed that the placement of the event sheets behind the layout was all I needed to do to pair them... Guess I was wrong. I never figured out if there was anyway to pair it though so if someone knows I'm still looking for that answer.

    To fix my problem I just created another layout with an event sheet and moved my objects and code over. Ill just have to get in the habit of making all my layouts with events and renaming them immediately and removing the events from display unitl I need them.

  • So I'm not sure whats going on but I ran into a problem. I was writing code for tile map collision when absolutely nothing work. So I disabled everything and wrote a simple code that is guaranteed to work... on start of layout set variable to 1. It did not work. instead of changing the value as told the variable keeps its initial value. Of course I can change starting value in the event sheet, but it seems that my code in the event sheet will not run. This leads me to believe that ive run into a bug, or there is something I just don't know.

MillyLamp's avatar

MillyLamp

Member since 30 Nov, 2014

None one is following MillyLamp yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies