Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi :D. Can you please tell me how to use questions and branches.

Hi, of course:

Question nodes don't contain any text, so if an NPC asks you a question, you would have to add a normal text node before the question node. The question node is just used to indicate that there are answer nodes following. The answer nodes can contain text, but it is intended that this text is not the spoken text by your character, but the choice you are presented when asked this question. Then, you can add text nodes after the answer nodes if any character should say something (including the player character). This way, you can also add options like "[End Dialog]" and nobody says anything.

The branch node is similar to the random and cycle node. These nodes can have multiple successors. The random node always chooses a random successor node, the cycle node remembers which successors were already used and goes through them in a round-robin manner and the branch node always uses the first possible successor. The first possible successor means: The first successor where the precondition evaluates to true.

Each node can have a precondition, a Lua expression for example "return playerHasTalkedToNpc and playerHealth > 4". In this example, the node would only be chosen if the condition is true. For branch, random and cycle nodes, nodes with negative preconditions will be ignored, for answer nodes, the answers with a negative precondition won't show up in the possible answers.


I hope this helps. Maybe I will find the time to record a short video tutorial in October...

( 1)

thx :D