Submissions by saluk tagged aibugs

So I left yesterday with the ability to walk around while the cutscene is taking place. What I had left until today however, was that the user still had to press the continue button for the cutscene to go to the next line. While this is helpful for slow readers, it's not so great for giving the feeling of stuff happening around you in real time. As much as I'd like to stay wishy washy and go "maybe the game is like this" or "maybe the game is like that", I think it's time to start making arbitrary decisions. The game is about reacting to a living environment - there is not much place for waiting for the player during dialog.

I'll have to come up with a solution for slow readers, but we'll cross that bridge when necessary. Speed slider? Just make it really damn slow for everybody? Just let the player pause if they DO need that (kind of baldurs gate style but for dialog rather than combat!) Something. Later.

Unfortunately, when I added a timeout for the textboxes, and took away player control, I ran into a bug that derailed me for the rest of my limited dev time. The first npc in the cutscene just kept repeating his same line over and over again. I could fix the bug with several workarounds, but I didn't like any of them. Not only were they not real solutions, but whatever weird behavior was the actual source was bound to come up again.

It turned out to be an issue with the behavior trees again (surprise surprise). When the textbox appeared, it sent the npc out of the cutscene tree and into the waiting for text tree, which I had added to his script yesterday. When the textbox went away, and he went back into the cutscene tree, it was supposed to resume where it left off, see that the line had been spoken, and clear the instruction away to wait for another cutscene step. However, upon resuming the display_line cutscene, he reset the whole cutscene brain, which was grabbing the line again to display it.

Ugh.

It turned out to be a relatively simple issue with my nodes resetting their state in cases where they should preserve it. I am close to not having to worry about the internals of my ai tree code, but I guess there are some weird stuff still in there that I have yet to find.

I'll post some more gifs later when there is something cool to actually show off.