Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Alarconte on Mon 27/11/2006 16:17:12

Title: Problem with GlobalInt and Visual Variables (SOLVED)
Post by: Alarconte on Mon 27/11/2006 16:17:12
I have a problem that I'nt know if is a problem.
I'm figthing a week with this problemÃ,  and I finally surrender and post here, thanks to any help.

There's a conection betwen the GlobalInt (variables of script) and the visual variables? (Understanme, the variables of the program that ones work without script, in a window).

I'm triying to affect visual variables from the global ints but i can't, If there wasn't any conecction, And now I'm lost and I don't know how to continue my game, because the use of the variables in dialogs is only avaible trougth the GlobalInt script

Thanks, I hope you understand the post (my technical english is not too good xD)
Title: Re: Problem with GlobalInt and Visual Variables
Post by: Da_Elf on Mon 27/11/2006 16:44:25
ive used

SetGraphicalVariable("seengetafix",GetGraphicalVariable("seengetafix")+1);

In my globals which lets me keep track of how many times ive spoken to a character since the conversations change depending on that. so yes you can affect your graphical variables from inside your global script.
Title: Re: Problem with GlobalInt and Visual Variables
Post by: Alarconte on Mon 27/11/2006 16:58:11
Oh! SetGraphicalVariable... I din't see it.. alot of thanks

But, this mean that Global Int and Graphical variable, are different varaibles? (I assume that yes..)
Title: Re: Problem with GlobalInt and Visual Variables
Post by: Khris on Mon 27/11/2006 17:53:21
Yes. Graphical variables used in the interaction editor can be named whereas GlobalInts are identified by their index number.

My guess is that you want to set a global int depending on what dialog option the player chose, to execute different code depending on the int's value, right?
You'll have to look into scripting, I'm afraid, as GlobalInts can't be accessed using only the interaction editor.
And using dialog_request is probably easier on many occasions, too.

Just learn the scripting language, it's not that hard. (The interaction editor commands will soon be discontinued, anyway.)