Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: anime2019master on Wed 30/06/2010 03:08:03

Title: Global Vairables?
Post by: anime2019master on Wed 30/06/2010 03:08:03
I'm not sure if this would be a basic scripting question, but here goes.
In the dynamic help when i looked up info on global int, it said they were obsoulete and I should consider  global vairables instead. Problem is, I tell well enough how to use them, but doesn't go into great detail on how to 'create' them, nor does it give an example line of script on thier creation; only on thier use. Any help?
Title: Re: Global Vairables?
Post by: Ryan Timothy B on Wed 30/06/2010 03:40:13
On the right side bar is "Global Variables".  You create global variables in there and it can be accessed within every script.

And yes, don't worry, this definitely belongs in beginners technical.

And to quote the manual:
QuoteThe Global Variables Editor is pretty self-explanitory. To add a variable, right-click and choose "Add". You can name the variable, and choose its type and initial value. Most of the time you'll probably be using the int and String types. Optionally, you can also set a default value for the variable.