Author Topic: Вопрос по веткам диалога  (Read 3110 times)

Offline Achill

  • olympusfonline.teamforum.ru
Вопрос по веткам диалога
« on: October 30, 2017, 10:50:43 am »
who knows how to make dialogue in the editor, in the choice of the line of dialogues "about what you want to know", each branch was read once, and then at the end, for example, "you already asked about it, I told"
Do my really need a variable for each branch?
Project "Fonline Olympus"
http://olympusfonline.teamforum.ru

Offline Slowhand

  • Go for the eyes, Boo! Go for the eyes!
Re: Вопрос по веткам диалога
« Reply #1 on: October 30, 2017, 11:55:15 am »
who knows how to make dialogue in the editor, in the choice of the line of dialogues "about what you want to know", each branch was read once, and then at the end, for example, "you already asked about it, I told"
Do my really need a variable for each branch?

It's not easy to understand what you exactly want, so I assume, you want to keep track and make sure player can only access each dialog branch once from an available list of answers. You can have 1 variable for that and play with binary values maybe? For example use binary representation: 0000 0001 would mean the 1st dialog was read but the other 7 was not, and 000 0011 would mean 1st and 2nd was read but other 6 wasn't, something like that. Use a script to set and get the bits of the variable. This solution sucks in my opinion, so I hope someone has a better one :)


Offline Achill

  • olympusfonline.teamforum.ru
Re: Вопрос по веткам диалога
« Reply #2 on: October 30, 2017, 12:37:42 pm »
It's not easy to understand what you exactly want, so I assume, you want to keep track and make sure player can only access each dialog branch once from an available list of answers. You can have 1 variable for that and play with binary values maybe? For example use binary representation: 0000 0001 would mean the 1st dialog was read but the other 7 was not, and 000 0011 would mean 1st and 2nd was read but other 6 wasn't, something like that. Use a script to set and get the bits of the variable. This solution sucks in my opinion, so I hope someone has a better one :)

I think you correctly understood the question, I need the player to read each branch only 1 time, so that the branch of dialogue options is reduced.
I was thinking about creating a script, but I decided to find out if there's a solution to this already for a long time, and without a script.
If you solve with the help of a script, you can create a simple array with the size of the number of branches and in each cell 1 or 0.  :)
Project "Fonline Olympus"
http://olympusfonline.teamforum.ru

Offline Slowhand

  • Go for the eyes, Boo! Go for the eyes!
Re: Вопрос по веткам диалога
« Reply #3 on: October 30, 2017, 01:19:02 pm »
If you solve with the help of a script, you can create a simple array with the size of the number of branches and in each cell 1 or 0.  :)

Persistence is easier if you use a game variable with the binary method, than storing an array.

Offline Achill

  • olympusfonline.teamforum.ru
Re: Вопрос по веткам диалога
« Reply #4 on: October 30, 2017, 01:31:06 pm »
Persistence is easier if you use a game variable with the binary method, than storing an array.

in this case there will be a lot of condition conditions for branches, many of their state combinations for each branch.
Project "Fonline Olympus"
http://olympusfonline.teamforum.ru