How do I move an NPC, and keep them there?

● ARCHIVED · READ-ONLY
Started by Nerkson 6 posts View original ↗
  1. So I'm working on a proof of concept game. It's got practically no story and horrible dialogue, but it's just there to see what I can do.

    Right now, I've been having to code a lot of conditions and switches for a goal. The main character is supposed to get a loaf of bread, but he needs to talk to his brother first. After talking to his brother, new dialogue options pop up in the town, as well as the ability to get the bread.

    Now, here's the kicker. Once the bread is obtained, the main character can talk to the town guard and the guard will let him pass, moving off to the side a few tiles. However, every time I exit the town and re-enter, the guard is back in his post!

    I've done a bit of googling but I'm not able to fix the problem. Plus, I'm trying to figure out another potential problem (How to make the player move to a specific cell via walking when talking to the guard, so the guard doesn't stop moving if the player tries to engage him from the side he's supposed to be walking to).

    http://i.imgur.com/knkaxXe.png

    http://i.imgur.com/F07MECT.png

    http://i.imgur.com/sTfCJG7.png
  2. Aha! I had read that earlier but I couldn't get it working. I re-read it and it seems that I made a few typos. It's working now!
  3. You are also much better off doing a search of this site first.  Google will turn up a lot of stuff which won't be any use to you.
  4. Yeah, I guess I forgot to search here first beyond browsing a few tutorials... I'll have to keep that in mind from now on. Thank you all for the help!
  5. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.