Modifié par gordonbrown82, 30 mai 2010 - 12:59 .
setting global variables. (solved)
Débuté par
gordonbrown82
, mai 30 2010 07:20
#1
Posté 30 mai 2010 - 07:20
I'd like to have a system where the player get's more points into different personality characteristics depending on which choices he makes in dialogues and other areas of the game. The problem is that i can't come up with a good way to do this via plots. It would probably be better to give +1 and -1 to different variables when the player chooses a certain conversation option. Then i could also see if the player has enough points in one personality trait to get a certain conversation option at another time. How can i accomplish this?
#2
Posté 30 mai 2010 - 08:09
Double post!
Modifié par _L_o_B_o_, 30 mai 2010 - 08:12 .
#3
Posté 30 mai 2010 - 08:09
It depends on how many characteristics and points you will use, but the easiest way that comes to my mind is to create a different plot for each characteristic. Then create as many flags as you need to store the available range of points.
For example:
pers_char_1.plot
Flags:
Flag Flag Name
0 LEVEL_0
1 LEVEL_1
...
N LEVEL_N
Later if you want to know the current level of a characteristic you'll have to loop through the plot flags until you find the flag that is set. Then knowing the value of the integer variable that you have use to iterate, you can easily add or subtract as many points as you want.
For example:
pers_char_1.plot
Flags:
Flag Flag Name
0 LEVEL_0
1 LEVEL_1
...
N LEVEL_N
Later if you want to know the current level of a characteristic you'll have to loop through the plot flags until you find the flag that is set. Then knowing the value of the integer variable that you have use to iterate, you can easily add or subtract as many points as you want.
Modifié par _L_o_B_o_, 30 mai 2010 - 02:01 .
#4
Posté 30 mai 2010 - 08:12
Use plots + local variables.
Local variables to store the values and plot scripts to return the values so you can use them in conversations. Note that using plots, you have to set pre-defined intervals for your check conditions.
You can use Craig's variable storage library here - http://social.biowar...t/1787/#details (otherwise, you would have to reuse existing variables or create new ones by extending the appropriate variable 2da)
Local variables to store the values and plot scripts to return the values so you can use them in conversations. Note that using plots, you have to set pre-defined intervals for your check conditions.
You can use Craig's variable storage library here - http://social.biowar...t/1787/#details (otherwise, you would have to reuse existing variables or create new ones by extending the appropriate variable 2da)
#5
Posté 30 mai 2010 - 11:35
i got an error E: 13:33:58 - plt_nonreligious_religious.nss(5): Likely Duplicate Constant Declaration (while compiling plot_script.nss)
it's not possible to include two plots in the same script?
it's not possible to include two plots in the same script?
#6
Posté 30 mai 2010 - 12:14
It is fairly possible to include two plots, or even 100s, but the flag names have to be unique because the flag names are automatically declared as constants in the script describing a plot :
// Plot defines
const string PLT_PHAE_TWF_LEVELS_TSFLAGS = "E4A4E49BD8814E16A37AFF32A0E5276D";
const int PHAETWF_LEVEL_NTB330_DONE = 0;
const int PHAETWF_LEVEL_CIR200_DONE = 1;
// Yada yada
// Plot defines
const string PLT_PHAE_TWF_LEVELS_TSFLAGS = "E4A4E49BD8814E16A37AFF32A0E5276D";
const int PHAETWF_LEVEL_NTB330_DONE = 0;
const int PHAETWF_LEVEL_CIR200_DONE = 1;
// Yada yada
Modifié par Phaenan, 30 mai 2010 - 12:15 .





Retour en haut






