Hey Tony,
It took a ton of new variables and a lot of code, but I managed to get it all to work, hopefully. Hopefully I can finish up work on this part of the system and get into something else.
Thanks for your help!
Interrupting Conversation Occasionally
-
- Posts: 111
- Joined: Mon Apr 08, 2019 8:01 am
Re: Interrupting Conversation Occasionally
Glad to help!
If you have any interest in paring down the code and variables and don't mind sharing your current code here, feel free to post it. I'll be happy to reply with any ideas I have.
But I also completely understand if you call it done and move on to the next part of your project.
If you have any interest in paring down the code and variables and don't mind sharing your current code here, feel free to post it. I'll be happy to reply with any ideas I have.
But I also completely understand if you call it done and move on to the next part of your project.
-
- Posts: 111
- Joined: Mon Apr 08, 2019 8:01 am
Re: Interrupting Conversation Occasionally
Hey Tony,
Sorry for taking so long to get back to you. Here's how the system works:
I used the same structure that you used, but I needed several new varaibles to get it to work the way I wanted to. These were:
* Could add item
* Discard choice completed
* Player threw away conversation item
* Need to return to conversation
* Conversation to return to
* Discard Node ID
* Keep Node ID
The <Reset Variables> node resets all item-related variables in the database to prepare for a player choice, and assigns the Discard Node & Keep Node IDs and Conversation title.
"Could add item" is set in the player inventory's script, returning true if the script could successfully add the item (and going straight to the keep node), and false if it could not. In the latter case, the item is sent to a overflow slot to be dealt with later.
"Discard choice completed" is set to false in <Reset Variables> and determines if the "Hands full" node is called next, which links to the Inventory Full Warning conversation. It is set to true immediately on starting the inventory warning conversation as the player needs to pick to discard the item waiting in the overflow slot or something else from their inventory.
If the player picks the option to discard an item, "Player threw away conversation item" is set to true, and I call PopConversationPosition() to return to the <Save Conversation> node- this will go immediately to the discard node as its conditions are "Player threw away conversation item" == true and "Discard choice completed"== true.
If the player wants to throw something from their inventory and keep the item, I open the overflow window to allow them to move the item into their inventory or throw it out if they change their mind. After the player makes the choice, I call StartConversation(), starting on the Keep Node ID or the Discard Node ID depending on their actions.
The "Need to return to converation" variable is required due to the inventory warning conversation potentially being called outside of a conversation. It's set to true in the <Reset Variables> node and then to false in the keep & discard nodes- this way if the inventory full warning conversation is called later it doesn't randomly jump back to the last time the player got an item from a conversation.
It's a bit complicated, but I think it makes sense more or less. Any feedback would be appreciated- I might come back to this and iterate on it again.
Sorry for taking so long to get back to you. Here's how the system works:
I used the same structure that you used, but I needed several new varaibles to get it to work the way I wanted to. These were:
* Could add item
* Discard choice completed
* Player threw away conversation item
* Need to return to conversation
* Conversation to return to
* Discard Node ID
* Keep Node ID
The <Reset Variables> node resets all item-related variables in the database to prepare for a player choice, and assigns the Discard Node & Keep Node IDs and Conversation title.
"Could add item" is set in the player inventory's script, returning true if the script could successfully add the item (and going straight to the keep node), and false if it could not. In the latter case, the item is sent to a overflow slot to be dealt with later.
"Discard choice completed" is set to false in <Reset Variables> and determines if the "Hands full" node is called next, which links to the Inventory Full Warning conversation. It is set to true immediately on starting the inventory warning conversation as the player needs to pick to discard the item waiting in the overflow slot or something else from their inventory.
If the player picks the option to discard an item, "Player threw away conversation item" is set to true, and I call PopConversationPosition() to return to the <Save Conversation> node- this will go immediately to the discard node as its conditions are "Player threw away conversation item" == true and "Discard choice completed"== true.
If the player wants to throw something from their inventory and keep the item, I open the overflow window to allow them to move the item into their inventory or throw it out if they change their mind. After the player makes the choice, I call StartConversation(), starting on the Keep Node ID or the Discard Node ID depending on their actions.
The "Need to return to converation" variable is required due to the inventory warning conversation potentially being called outside of a conversation. It's set to true in the <Reset Variables> node and then to false in the keep & discard nodes- this way if the inventory full warning conversation is called later it doesn't randomly jump back to the last time the player got an item from a conversation.
It's a bit complicated, but I think it makes sense more or less. Any feedback would be appreciated- I might come back to this and iterate on it again.
Re: Interrupting Conversation Occasionally
Given the conditions that you need to handle, that looks good to me. Nothing additional comes to mind.