As the title says, is it possible to take a global variable, change the value in the room script, and then use the changed variable back in the global script?
header
Code: ags
room script
Code: ags
Global Script
Code: ags
The player should say "1" if iCharAct[17] was changed properly, but somewhere it was dropped. Any way to fix this or am I not allowed to change variables in the room script?
Thanks.
header
int iCharAct[23]; // header declaration
room script
iCharAct[17] = 1; // changing value in room script
Global Script
if (iCharAct[17] == 1)
{
player.Say("1"); // should say this if iCharAct[17] is 1, but he doesn't
}
The player should say "1" if iCharAct[17] was changed properly, but somewhere it was dropped. Any way to fix this or am I not allowed to change variables in the room script?
Thanks.