How do I make a logic for a multiple choice dialog in a game?

1 favourites
  • 5 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Please could someone guide me as I make a logic to build a dialog in which according to the player's response the path of the conversation changes.

    Example: the question is: what do you want?

    answer A: a pan;

    answer B: a horseshoe.

    The next question and answer group is conditioned to the answer given in the first dialogue and so on.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use a variable or array to keep track of previous answers. On answer, set variable to a or b.

    When displaying question 2, if variable is a, show question 2a. If variable is b, show question 2b. A similar idea can be applied to different answer choices as well.

  • We tried your suggestion, but the logic isn't woriking.

    Do you able to make this for us? How much would you charge for it?

  • I made this template:

    Markdown_Dialogue_System

    cdn.discordapp.com/attachments/225550155531812865/989114414433194005/Markdown_Dialogue_System_v1.0.c3p

    Example

    Choice Branch

    #test
    Mia : Hello.
    Amy : Have you visited our company before?
    Mia : Yes, I was here two years ago.
    Amy : Would you like tea or coffee?
    (...100)
    [Tea](#test-tea)
    [Coffee](#test-coffee)
    
    #test-coffee
    Mia : Coffee, please. With milk.
    Amy: I am afraid we haven't got any milk. I'm very sorry.
    Mia: It doesn't matter.
    
    #test-tea
    Mia : Tea, please.
    Amy: Okay.
    

    Variable in String

    Mia: Hey, {name}. What are you doing?
    

    Condition in String

    #buy-fruit
    guy : Hi, {if gold >= 1000 ? "Rich Man!" : "{name}."} You have {gold} coin. {if gold >= 10 ? "Do you want to buy {if gold > 25 ? fruit1 : fruit2}?" }
    

    Call Function in String

    #show-me-the-money
    Starcraft:S\.H\.O\.W\.\.M\.E\.\.T\.H\.E\.\.M\.O\.N\.K\.~E\.Y\.
    callFunction("AddData, gold, 1000")
    
    
    :===========================================================
    : ■ CheatSheet
    :===========================================================
    : ○ Guide in Section
    : ----------------------------------------------------------
    : text name : text
    : choice [This is a choice.](#scenes)
    : wait (...300)
    : goto (#section)
    : function callFunction("ShakeScreen, 1, 0.25")
    : ----------------------------------------------------------
    : ○ Escapes in "Text" - "This is a *string* and {variable}."
    : ----------------------------------------------------------
    : variable {string}
    : bold *text*
    : delete text~~~~
    : newline \n
    : wait for 50 ms \.
    : wait for 250 ms \-
    : wait for 1,000 ms				\|
    : display directly $text$
    : ----------------------------------------------------------
    : ○ Branch in Text - {if condition ? True : False} 
    : ----------------------------------------------------------
    : condition | < | <= | > | >= | = | == | <> | != |
    : branch | number | variable | "string" | "This is a string and {variable}." | 
    : ..........................................................
    : branch only True {if condition ? True}
    : branch True & False {if condition ? True : False}
    : ..........................................................
    : compare number {if money >= 2000 ? "Rich Man!" : username}
    : compare variable {if condition != variable ? "text1" : "text2"}
    : compare "text" {if weather = "Cloudy" ? "It looks like rain."}
    : ----------------------------------------------------------
    : Note: Use `callfunction` set variable to make more branches.
    : Note: All variables from dictionary. equal to `dictionary.Get(variable)`
    :===========================================================
    
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)