Yes, you could basically declare one of the control variables as an empty array at game start. Then every time the player made a choice, push their answer into that array.
It would look like this at game start:
Control Variables: #777 = [];
Then at the end of the game it would look something like
Control Variables: #777 = ['yes', 'no', '3', '1', 'yes', '1', 'no'];
The challenge would be keeping track of which value out of that array you want to fetch when the time comes to evaluate the data.
Storing an array in a variable is possible, but it requires a rather complex construct to get specific data points out of it.
Much easier is the option to assign a different switch or variable to each choice and store the result directly. This has the disadvantage that you'll need a lot of switches, but the enormous advantage that the engine can react to each decision directly by event page conditions.
So it depends on how big your decision tree is going to get - but considering the amount of work for each branch this should still be far below the maximum number of available switches and variables.
and yes, those are always stored per game - only the self-switches are stored per event, and even they are remembered for every event on every map at the same time.
In addition to the other two suggestions, you could use an object instead of an array and have each key be what decision it is, so
Control variables #x = {};
When you want to add something to it you'd do $gameVariables.value(x).decisionKey = "string here";
Then when you want to retrieve or check it, you'd look at $gameVariables.value(x).decisionKey
You can also do $gameVariables.value(x)["decision key"] if you want keys with spaces in them.
Given that you're very new to this, I'm concerned that the variety of answers you're getting might confuse you. While nothing that anybody here said is incorrect, I feel that using either arrays or objects would be very excessive (considering the examples that you gave of what you're looking to do).
As Andar and ATT_Turan stated, Variables and Switches exist for the exact purpose that you're describing. Variables are ideal for holding number values, and Switches are ideal for holding boolean (true/false) values. You technically can store any type of value you want in a Variable, but the editor assumes that they contain numbers, so you will generally have to jump through some additional hoops to make use of variables that contain non-numerical values.
Unless you're running out of available variables and switches to use, I don't really see a good reason to pack a bunch of unrelated data together into an array or object, and doing so would stop you from being able to use those values in page conditions. There are certainly situations where it can make sense to use arrays and objects, but the things that you're talking about wanting to do aren't really included among those situations.
So basically the value of a variable is saved for the whole game?
For example:
At the start of the game I choose answer 3 in a dialogue - and the variable for this dialogue is set to 3.
The variable keeps the value of 3 for the whole game (as long as I don't change it myself)?
Thanks. Then this is for most of it the best solution.
Because for most choices there are 4-5 different answers that affect the story or how much a NPC likes/dislikes you, so a switch (with only on/off) would be not enough.(I thought the variables would be set to the default value everytime you start the game^^)
The other stuff can be done with an array.
Thank you all for the fast replies 🙂