Back and forth conversation

This forum is for discussing anything related to The Quest editor.

Back and forth conversation

Postby trainman61 » Wed Apr 07, 2021 8:09 am

I have a quick question. I am making certain interactions where a player is talking to an NPC, and then when a small back and forth goes on, the conversation ends and then immediately when the player presses goodbye, they enter a conversation with another NPC. I was able to script it and code it so that it works most of the time, the problem is sometimes it just doesn't.
What I do is when one interaction ends, it sets the state of a global state I made, and then the next conversation with the NPC happens. I make it so that every change to a new NPC makes it so that the next part of the interaction happens after each global state change.
Pretty much all the interactions work, its just that sometimes after one interaction with the NPC, the next one is just silence, and then when I talk to them again, it's still silence.
Then when I talk to the next person, the conversation continues, having skipped the one part that occurred with the silence.
But it doesn't happen every time, only occasionally, and at random parts. In the editor it works fine, but in game it just sometimes doesn't, and when I save and restore it from before the conversation, it will work perfectly fine, or not work at a different part. I can do it 5 times in a row, and it go wrong in different parts, with doing nothing different between each parts.
Is it just because the editor wasn't really meant to do conversations that way, or is there something I am doing wrong?
trainman61
 
Posts: 9
Joined: Sun Sep 06, 2020 3:57 am

Re: Back and forth conversation

Postby Elendil / Redshift » Wed Apr 07, 2021 8:30 am

Sorry for the problem!

From your description it seems that *something* does go wrong but I have no idea what. I'd recommend you try and change things a bit so you work around the problem. If I understand correctly you are trying to have a "back-to-back" conservation with multiple npcs, basically in the same dialogue. Let the conservation end and let the player initiate the conservation with the next npc. Maybe add a little story while they'd want/have to do it.

(My usual comment: We are just two guys, the original game engine was written by someone else and I just inherited it and also we are neck deep in our next game and have to concentrate on it, yada, yada. :lol: Sorry I can't help much. Perhaps someone else has a proper solution for you.)
User avatar
Elendil / Redshift
Site Admin
 
Posts: 940
Joined: Sun Oct 09, 2011 11:35 am

Re: Back and forth conversation

Postby trainman61 » Wed Apr 07, 2021 8:46 am

Basically, Its an NPC saying something, then the player having only one option to answer, and then that NPC saying something again until the last thing said runs a code that sets a global state, then when the player presses goodbye, they immediately talk to another NPC that their conversation only runs when the global state of the last thing said by the other NPC, because its basically a conversation between three people, and I want it to run its course before the player has any chance to move or do anything.
I am actually doing this as a small little project of teaching myself to do basic coding, and I want to write an article about it (on medium, a site where anyone can write whatever) about me learning to code through a video game, and have it for my resume/professional profile to possibly help me get a job (not in coding, but in a job that having a basic understanding of coding helps). This is basically the last thing that I need fixed to finish the project. I could make all these conversations happen in a small scene, but that means going back and deleting dialogue things from NPCs and making sure I don't mess anything else up.
trainman61
 
Posts: 9
Joined: Sun Sep 06, 2020 3:57 am

Re: Back and forth conversation

Postby Elendil / Redshift » Thu Apr 08, 2021 8:40 am

The Quest's scripting language is a completely custom, one-off one, thrown together to only support The Quest. And I still had to fix things after the mentioned other programmer has left us, poking and learning things along the way. I wouldn't have chosen to create it but it wasn't my choice.

However, in a way, this is a good learning experience. In the "real world", there are no bug free software (to exaggerate a bit, but not too much). Even Microsoft's C++ compiler has had (and continue to have) quite a few serious bugs, some of which I had to work around at the time. One could say that software development is running into unexpected things and developing acceptable compromises. ;)

In all actuality I'd love to help more and fix The Quest but at this point in time that's not realistic. The game has received a lot of fixes and now I can only spare time for extremely serious, show stopping bugs, if any is found. I hope you can understand.
User avatar
Elendil / Redshift
Site Admin
 
Posts: 940
Joined: Sun Oct 09, 2011 11:35 am


Return to Editor

Who is online

Users browsing this forum: No registered users and 5 guests

cron