NPC taking extra turns

I have a game (a snakes and ladders). The NPC (there are two) take their turns right after player, usually correctly and fairly. Every now and then, the game will go player, NPC1, NPC2, NPC1, NPC2, turn end, instead of player, NPC1, NPC2, turn end, the way it should. Even when doubles are rolled, and one or the other NPC plays twice, the game is correct. It is just an occasional occurrence. And the game never skips NPC1 or NPC2, just the player. There is nothing in the script that explains this.
This is also the game that plays music on its own during editing, not during playing. It is a game that gives me the error message "trouble executing the script 'finish game'" (always in triplicate) even though there is no finish game script in my game at all. This error message occurs occasionally when I open the game without saving changes first, and is always accompanied by one or more samples of music from somewhere in the game, this time, playing within game without permission or request, rather than during the editing, which is decidedly stranger, especially, since it tends to repeat over and over again, with long breaks or pauses between plays, when it is going on outside of the game play. I have no idea why these things are happening.


How have you implemented the NPCs AI? Are you using The Pixie's NpcLib?


Well. I cannot say I knew the NPCs actually had their own AI. I start each roll of the dice with a verb action. It sets off a set of functions that set off other functions then returns or continues on to other functions.

I mean I am pretty sure it is supposed to be a problem with timing, and right now the score board only updates after all three parties have played, which is when the words, "Hit the (object: Dice)!" (should) show up, but often the line shows up after NPC2 takes his turn, but NPC1, then takes a second turn, followed by NPC2 again. And, often, they take three turns a piece, about as often as they take two, though usually they only take one.

I will look at Pixies NPCLib, but it sounds like it might be a total renovation and might have to wait for me.


Yes, you should take a look at the NpcLib, It'll make AI a lot easier, at least it does for me.


Hello Ms. Jennifer.

I'm thinking that maybe the finish game script is a built-in part of quest. Have you looked for something that references a "finish game" script in the hidden things that show up when you go all the way down and click on "filter" on the left?


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums