I’m working on a game in CoSpaces and need some advice on setting up choice paths that lead to different endings based on the player’s responses to questions. Here’s a bit about the game:
Game Details:
Interrogation Scene: The player is in an interrogation room and is asked multiple-choice questions by an interrogator.
Unique Responses: Depending on the player’s choice, the interrogator responds differently. For example:
If the player chooses “Yes, I know who I am,” the interrogator responds with, “Good, then we can skip the pleasantries.”
If the player stays silent, the interrogator says, “Your silence speaks volumes.”
Ending Paths: The player’s choices throughout the interrogation lead to different endings, such as escaping the room, being judged, or finding a secret path.
Choice Paths:
The game uses a system of choice paths to determine the ending based on the player’s responses. For example:
Choice Path: 1B, 2C, and 3A
Ending: Assigned to the unique sequence of choices
We want the player’s dialogue choices to lead to different endings based on the paths they take. We’ve tried using the Choice Panel in CoSpaces, but we need help on how to implement a system that can track the player’s choice paths and assign the appropriate endings. How can we achieve this in CoSpaces using CoBlocks or any other method that does not require physical items or objects for the player to interact with?
Any ideas or examples would be greatly appreciated!
Apologies for the INCREDIBLY late reply, could you try to configure this in such a form where it can be applied to these types of question sets as shown in the image? Thanks in advance.
First, I found that using variables for actions after choices are tiring so I decided to use it
(“myVar” is changed to “Paths”) only for preventing users from selecting choice B after A etc.
Therefore, you would only need to add the code after choices/time is out
Here’s my question, are we able to do this exact same thing but with each individual option you choose from the choice panel? I am not sure if using A and B keys on a keyboard is what we’re going for, but if it’s the only way, then I guess we’ll use it.
It would be all fine to use choice panel for choices
However, since it will not close with code (Only if you selected or CoSpaces is restarted or closed) , a closing with time is not possible as I know.
You can also use the “choice panel” seen below to easily allow the player to make choices. You can remix this quick example project I made to see the full code.
You can remove all the events from forever loops and run parallel - events only need to be declared once, at the beginning of your code (unless setting up events based on a condition or other programming).
I suggest you explore setting up your choices in a list variable, and storing your choice paths in list variables - this would give you flexibility. You can have lists of lists, so a possible structure is:
list choices =
choice 1
choice 1a
choice 1b
choice 1c
choice 2
choice 2a
choice 2b
choice 2c
You can do this by going to Data > Lists and setting up a structure like so: