Terminating a conversation in convlib

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!
J


Not sure, and it depends on how you have this set up, but try setting "activeconversations" of the character to false. This would be inside a topic.

if (Got(some object)) {
  msg("say this")
}
else{
  msg("say this; the character walks away")
  character.parent = some other room
  character.activeconversations = false
}

If the player can later talk to the character, you will need to set it back to true later.


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

Support

Forums