Terminating a conversation in convlib program

leechunsonnn
04 Apr 2019, 04:40

Hi all,
I'm using convlib to create a semi-dynamic conversation and need to do something that I think should be fairly straightforward. Essentially I have a conversation topic with an if/else statement which is called depending on whether the player is carrying a certain object. In other words: If(player has object){say this}, else{say this}.

My problem is that I want to terminate the conversation at the end of my else{} statement but not the if{} statement (as the NPC walks away). In short, I need a line of code that does what the 'tickbox' option available at the top of the convo tab does, to add to my else{} command. I don't want a work-around where I put the if/else statement outside the conversation topic for complex reasons, this first way will allow me to keep my code much more compact and easier to follow.

Hopefully that makes some vague sense and someone can help!
Chunsonn


jmnevil54
04 Apr 2019, 05:31

Anonynn might know about this.


Dcoder
04 Apr 2019, 06:58

Sounds like you just need to restructure your code. Try reversing the conditions: if player DOESN'T have object, then terminate convo; else continue with the flow of code (move everything afterwards to else).


Anonynn
04 Apr 2019, 09:10

Decoder suggested the way I would do it. That would make things easier on you. Not having the object, terminate. Having the object (else) continue with the conversation.

I also play around with the player visiting a certain place before they can return and continue the conversation. If you need help with doing that, lemme know too.

Anonynn.