AGS Pointers for Dummies: Difference between revisions

Jump to navigation Jump to search
Link to online manual
(Link to online manual)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<center>http://img242.imageshack.us/img242/6929/pointerdummieswm0.gif</center>
[[Image:pointerdummies.gif|center]]


<center>'''<font size="4">AGS Pointers for Dummies</font>'''</center>
<center>'''<font size="4">AGS Pointers for Dummies</font>'''</center>


<center>'''''<font size="3">A reference for the rest of us!</font>'''''</center>
<center>'''''<font size="3">A Reference for the Rest of Us!</font>'''''</center>


If you're reading this, then you've come looking for answers. ''What are pointers? How do I use them? What makes them better than just using integers?'' These questions, amongst others shall be answered. You're not alone in the confusion caused by pointers. Many people who are new to scripting, or haven't ever used a language that supported pointers don't understand them right away. That's why I'm here to help.
If you're reading this, then you've come looking for answers. ''What are pointers? How do I use them? What makes them better than just using integers?'' These questions, amongst others shall be answered. You're not alone in the confusion caused by pointers. Many people who are new to scripting, or haven't ever used a language that supported pointers don't understand them right away. That's why I'm here to help.
Line 13: Line 13:


==Variables==
==Variables==
A variable, in the context of scripting, is a way to represent a value. In AGS, there are five different [http://www.bigbluecup.com/manual/Datatypes.htm data types] which can be used to represent a variable. These types include '''char''', '''short''', '''int''', '''String'''<sup>1</sup>, and '''float'''. A '''char'''-type variable is one that can hold only a single character (i.e., 'A', 'B', etc.) or a number within the range 0 to 255. A '''short'''-type variable can store integers within the range -32768 to 32767. An '''int'''-type variable can store integer values within the range -2147483648 to 2147483647. A '''String'''-type variable can hold a string of characters (i.e., "this is some text!") of ''virtually''<sup>2</sup> infinite length. A '''float'''-type variable can store floating-point decimals within the range -2147483648.0 to 2147483647.0, and has precision<sup>3</sup> up to approximately 6 decimal places, though this will vary based on the actual number.
A variable, in the context of scripting, is a way to represent a value. In AGS, there are five different [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm data types] which can be used to represent a variable. These types include '''char''', '''short''', '''int''', '''String'''{{footnote parent|1}}, and '''float'''. A '''char'''-type variable is one that can hold only a single character (i.e., 'A', 'B', etc.) or a number within the range 0 to 255. A '''short'''-type variable can store integers within the range -32768 to 32767. An '''int'''-type variable can store integer values within the range -2147483648 to 2147483647. A '''String'''-type variable can hold a string of characters (i.e., "this is some text!") of ''virtually''{{footnote parent|2}} infinite length. A '''float'''-type variable can store floating-point decimals within the range -2147483648.0 to 2147483647.0, and has precision{{footnote parent|3}} up to approximately 6 decimal places, though this will vary based on the actual number.


For information on defining and assigning values to variables read the entry in the manual [http://www.bigbluecup.com/manual/Datatypes.htm here].
For information on defining and assigning values to variables read the entry in the manual [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm data types].
 
<sup>1</sup>'''<font size="1">The String type is only defined as of AGS v2.71 and higher. Older versions use the now deprecated string type.</font>'''
 
<sup>2</sup>'''<font size="1">The length for Strings is limited by your computer's physical memory. A String will take up 4 bytes of memory, plus 1 byte for each character it contains.</font>'''
 
<sup>3</sup>'''<font size="1">Floating-point decimals won't always evaluate as you might expect when doing certain mathematical operations (this is due to their precision levels). See the manual entry on [http://www.bigbluecup.com/manual/Datatypes.htm data types] for more information.</font>'''


==Pointers==
==Pointers==
Line 29: Line 23:
''And, how do I use them?''
''And, how do I use them?''


In AGS, you can only create pointers to certain data types. These are called the ''managed'' types<sup>4</sup>.
In AGS, you can only create pointers to certain data types. These are called the ''managed'' types{{footnote parent|4}}.


==Managed Types==
==Managed Types==
AGS has certain ''managed'' types<sup>4</sup> that you can not create an instance (variable declaration) of, but you ''can'' create pointers to<sup>5</sup>.  All of the variables of managed types are ''managed'' by AGS.  These include the types: [http://www.bigbluecup.com/manual/GUI%20Button%20functions%20and%20properties.htm Button], [http://www.bigbluecup.com/manual/Character%20functions%20and%20properties.htm Character], [http://www.bigbluecup.com/manual/DateTime%20functions%20and%20properties.htm DateTime], [http://www.bigbluecup.com/manual/DynamicSprite%20functions%20and%20properties.htm DynamicSprite], [http://www.bigbluecup.com/manual/File%20functions%20and%20properties.htm File], [http://www.bigbluecup.com/manual/Game%20_%20Global%20functions.htm Game], [http://www.bigbluecup.com/manual/GUIFuncsAndProps.htm GUI], [http://www.bigbluecup.com/manual/GUI%20control%20functions%20and%20properties.htm GUIControl], [http://www.bigbluecup.com/manual/Hotspot%20functions%20and%20properties.htm Hotspot], [http://www.bigbluecup.com/manual/Inventory%20item%20functions%20and%20properties.htm InventoryItem], [http://www.bigbluecup.com/manual/GUIInvFuncs.htm InvWindow], [http://www.bigbluecup.com/manual/GUI%20Label%20functions%20and%20properties.htm Label], [http://www.bigbluecup.com/manual/GUI%20List%20Box%20functions%20and%20properties.htm ListBox], [http://www.bigbluecup.com/manual/Maths%20functions%20and%20properties.htm Maths], [http://www.bigbluecup.com/manual/Object%20functions%20and%20properties.htm Object], [http://www.bigbluecup.com/manual/Overlay%20functions%20and%20properties.htm Overlay], [http://www.bigbluecup.com/manual/Parser%20functions.htm Parser], [http://www.bigbluecup.com/manual/Region%20functions%20and%20properties.htm Region], [http://www.bigbluecup.com/manual/Room%20_%20Screen%20functions.htm Room], [http://www.bigbluecup.com/manual/GUI%20Slider%20properties.htm Slider], [http://www.bigbluecup.com/manual/GUI%20Text%20Box%20functions%20and%20properties.htm TextBox], and [http://www.bigbluecup.com/manual/ViewFrame%20functions%20and%20properties.htm ViewFrame (AGS 2.72 and higher only)].
AGS has certain ''managed'' types{{footnote alt parent|4}} that you can not create an instance (variable declaration) of, but you ''can'' create pointers to{{footnote parent|5}}.  All of the variables of managed types are ''managed'' by AGS.  These include the types: [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags45.htm AudioChannel], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags46.htm AudioClip], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags54.htm Button], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags47.htm Character], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags48.htm DateTime], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags49.htm Dialog], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags50.htm DialogOptionsRenderingInfo], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags51.htm DrawingSurface], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags52.htm DynamicSprite], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags53.htm File], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags54.htm Game], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags55.htm GUI], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags56.htm GUIControl], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags63.htm Hotspot], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags64.htm InventoryItem], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags58.htm InvWindow], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags59.htm Label], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags60.htm ListBox], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags65.htm Maths], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags66.htm Mouse], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags68.htm Object], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags69.htm Overlay], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags71.htm Parser], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags72.htm Region], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags73.htm Room], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags61.htm Slider], [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags62.htm TextBox], and [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags74.htm ViewFrame].
 
<sup>4</sup>'''<font size="1">AGS's managed types are those listed here. You cannot create a new managed type within AGS's scripts; to create a new managed type you would need to write a plugin. Some module writers may use the keyword ''managed'' to prevent users from creating instances of structs that are meant to be used statically. This does not however make the type managed. Only AGS's built-in managed types and any managed types created via plugins are actually managed, and therefore are the only types that can have pointers to them.</font>'''
 
<sup>5</sup>'''<font size="1">Not all of the managed types are meant to have pointers to them.  Game, Maths, Parser, and Room do not need pointers (you can't even assign them a value).</font>'''


==Working With Managed Types==
==Working With Managed Types==
You can work with these managed types through pointers.  You define a pointer by typing the name of the managed data type, then a space, an asterik (*)<sup>6</sup>, and finally the name of the pointer. So, if we want to create a GUI pointer (this is expressed as GUI*) called GUIPointer, we could type the following:
You can work with these managed types through pointers.  You define a pointer by typing the name of the managed data type, then a space, an asterisk (*){{footnote parent|6}}, and finally the name of the pointer. So, if we want to create a GUI pointer (this is expressed as GUI*) called GUIPointer, we could type the following:


   GUI *GUIPointer;
   GUI *GUIPointer;


This creates a pointer that can ''point'' to any GUI stored in the memory. However, until it is assigned a value, it is an empty, or ''null'' pointer. We'll first discuss how to assign pointers a value, then we'll discuss null pointers.
This creates a pointer that can ''point'' to any GUI stored in the memory. However, until it is assigned a value, it is an empty, or ''null'' pointer. We'll first discuss how to assign pointers a value, then we'll discuss null pointers.
<sup>6</sup>'''<font size="1">The asterik doesn't necessarily have to be attached to the name of the pointer, such as "GUI *MyGUIPointer", it can also be attached to the data type itself, such as "GUI* MyGUIPointer". However, it will still be compiled as if it is attached to the name of the pointer, not the data type, so if you define multiple pointers at once, you will still need an asterik for each pointer.</font>'''


==Array of Pointers==
==Array of Pointers==


It should be noted here that when defining pointers, you can also create an [http://www.bigbluecup.com/manual/Arrays.htm array] of pointers. When you create an array you are simply defining a set of variables (or in this case, pointers) which all have the same name. You access each one individually using an index between brackets ([ and ]).
It should be noted here that when defining pointers, you can also create an [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm#Arrays array] of pointers. When you create an array you are simply defining a set of variables (or in this case, pointers) which all have the same name. You access each one individually using an index between brackets ([ and ]).


Defining an array of pointers works the same way as defining any other array does, so to define an array of GUI*s called myguis to hold 5 GUI*s, you would type:
Defining an array of pointers works the same way as defining any other array does, so to define an array of GUI*s called myguis to hold 5 GUI*s, you would type:
Line 56: Line 44:


With arrays you can't assign initial values, and the valid indices are from 0 to the size of the array minus one (in this case, 0 to 4). You treat an array of pointers just like you would ordinary pointers.
With arrays you can't assign initial values, and the valid indices are from 0 to the size of the array minus one (in this case, 0 to 4). You treat an array of pointers just like you would ordinary pointers.
===Dynamic Array of Pointers===
As of AGS 3.0, you can have [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags37.htm#DynamicArrays dynamic arrays] of the built-in types, including the managed types. The assignment here works a little differently:
  GUI *daguis[] = new GUI[5];
Notice that we don't use an asterisk after the '''new''' keyword. Keep that in mind if you plan to use dynamic arrays of pointer types.


=Assigning A Pointer A Value=
=Assigning A Pointer A Value=
Line 67: Line 63:
   GUI *GUIPointer = gMygui;
   GUI *GUIPointer = gMygui;


Global pointers can't have an initial value assigned though, so this will only work if you define the pointer inside of a function. When defining more than one pointer of the same type at once, it is necessary to use an asterik for every pointer. So, if you want MyGUIPointer to point to MYGUI, and OtherGUIPointer to point to OTHERGUI, you can do this:
Global pointers can't have an initial value assigned though, so this will only work if you define the pointer inside of a function. When defining more than one pointer of the same type at once, it is necessary to use an asterisk for every pointer. So, if you want MyGUIPointer to point to MYGUI, and OtherGUIPointer to point to OTHERGUI, you can do this:


   GUI *MyGUIPOINTER = gMygui, *OtherGUIPointer = gOthergui;
   GUI *MyGUIPOINTER = gMygui, *OtherGUIPointer = gOthergui;


If you forget an asterik then it will try to create a new instance (create a new variable) of the type GUI. AGS doesn't allow the user to create new instances of managed types, so this would crash your game. So, it's always important to remember your asteriks.
If you forget an asterisk then it will try to create a new instance (create a new variable) of the type GUI. AGS doesn't allow the user to create new instances of managed types, so this would crash your game. So, it's always important to remember your asterisks.


==A More Useful Assignment==
==A More Useful Assignment==
Line 112: Line 108:
The String type isn't one of AGS's managed types, nor can you create a pointer to it. So why then am I bringing it up? The fact is, the String type is actually internally defined as a pointer, which is how it is able to have it's virtually infinite maximum length.
The String type isn't one of AGS's managed types, nor can you create a pointer to it. So why then am I bringing it up? The fact is, the String type is actually internally defined as a pointer, which is how it is able to have it's virtually infinite maximum length.


Prior to AGS 2.71, AGS used the now deprecated string type. The string type was internally defined as an [http://bigbluecup.com/manual/Arrays.htm array] of 200 characters ('''char'''s). This meant that strings had a maximum length of 200 characters themselves.
Prior to AGS 2.71, AGS used the now deprecated string type. The string type was internally defined as an [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm#Arrays array] of 200 characters ('''char'''s). This meant that strings had a maximum length of 200 characters themselves.


With the introduction of AGS 2.71 came the new String type which removed that limit. And how did it do it? It used a pointer. Not an AGS-style pointer, but a pointer nonetheless. In programming languages such as C and C++, a pointer-to-char (char*)<sup>7</sup> creates a special type of pointer. Instead of just pointing to one single variable, a char* can point to a virtually infinite number of chars in the form of what is known as a string-literal (such as "this is some text").
With the introduction of AGS 2.71 came the new String type which removed that limit. And how did it do it? It used a pointer. Not an AGS-style pointer, but a pointer nonetheless. In programming languages such as C and C++, a pointer-to-char (char*){{footnote parent|7}} creates a special type of pointer. Instead of just pointing to one single variable, a char* can point to a virtually infinite number of chars in the form of what is known as a string-literal (such as "this is some text").


Since AGS uses a special type of pointer for managing the String type, it can still hold the value '''null''' (this is what Strings are initialized to), and when used as a function parameter, can be made optional in the same manner (see the section on [[#Optional_Pointer_Parameters|optional parameters]] for more information).
Since AGS uses a special type of pointer for managing the String type, it can still hold the value '''null''' (this is what Strings are initialized to), and when used as a function parameter, can be made optional in the same manner (see the section on [[#Optional_Pointer_Parameters|optional parameters]] for more information).
<sup>7</sup>'''<font size="1">In AGS you can't create a char*, as char isn't one of AGS's managed types. This type of pointer is used in scripting languages like C and C++. For storing string-literals AGS uses the String type (or the string type for AGS versions prior to 2.71).</font>'''


===Script O-Names===
===Script O-Names===
Line 129: Line 123:
For all we know the gui array itself could be an array of pointers to something stored deeper within the bowels of AGS, but it's not really important as in the end they would still both point to the same GUI, and this is just an example anyway.
For all we know the gui array itself could be an array of pointers to something stored deeper within the bowels of AGS, but it's not really important as in the end they would still both point to the same GUI, and this is just an example anyway.


Using an integral system you would have to acess the gui array any time you wanted to perform any operations on the GUI<sup>8</sup>. So, if we wanted to move MYGUI to (30, 120), in an integral system we could do this:
Using an integral system you would have to acess the gui array any time you wanted to perform any operations on the GUI{{footnote parent|8}}. So, if we wanted to move MYGUI to (30, 120), in an integral system we could do this:


   gui[MYGUI].SetPosition(30, 120);
   gui[MYGUI].SetPosition(30, 120);
Line 138: Line 132:


So it makes our code a bit shorter then, but it's essentially the same. All-in-all not a particularlly convincing example. So let's take a look at another built-in pointer: '''player'''.
So it makes our code a bit shorter then, but it's essentially the same. All-in-all not a particularlly convincing example. So let's take a look at another built-in pointer: '''player'''.
<sup>8</sup>'''<font size="1">I have taken the liberty here of envisioning an integral system set up much as AGS 2.7+ is set up, only since it is an integral system it uses integers instead of pointers. In this example AGS structs still have member functions, and all other non-pointer-related functionality of AGS is the same.</font>'''


===Player Keyword===
===Player Keyword===
Line 153: Line 145:
This also provides advantages when working with the player's active inventory item.
This also provides advantages when working with the player's active inventory item.


===Player.ActiveInventory===
====Player.ActiveInventory====


In an integral system to access the player character's active inventory, you would have to do something like this:
In an integral system to access the player character's active inventory, you would have to do something like this:
Line 173: Line 165:


===File*===
===File*===
Another example can be seen if we look at the [http://www.bigbluecup.com/manual/File%20functions%20and%20properties.htm File] type.
Another example can be seen if we look at the [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags53.htm File] type.


In an integral system, you would access an external file like this:
In an integral system, you would access an external file like this:
Line 225: Line 217:
==Extending The Built-In (Managed) Types==
==Extending The Built-In (Managed) Types==


Now that we've seen what pointers are, how they are used, how they relate to AGS, and some basic uses of them, let's take a look at a different kind of usage. In AGS we can create our own custom-defined datatypes using [http://www.bigbluecup.com/manual/structs.htm structs].
Now that we've seen what pointers are, how they are used, how they relate to AGS, and some basic uses of them, let's take a look at a different kind of usage. In AGS we can create our own custom-defined datatypes using [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm#struct struct].


You define a struct like this:
You define a struct like this:
Line 237: Line 229:
That would create a new datatype called MyStruct which would have two data members and one member function. You could then create a variable of this type, and do all sorts of fun things with it. Though it's uses don't end there.
That would create a new datatype called MyStruct which would have two data members and one member function. You could then create a variable of this type, and do all sorts of fun things with it. Though it's uses don't end there.


You can also make a pointer a member of a struct<sup>9</sup>, which provides some interesting possibilities. With a pointer as a member, you can essentially extend built-in datatypes (i.e., the managed types).
You can also make a pointer a member of a struct{{footnote parent|9}}, which provides some interesting possibilities. With a pointer as a member, you can essentially extend built-in datatypes (i.e., the managed types).
 
<sup>9</sup>'''<font size="1">Structs can only have pointers as members in AGS 2.71 and later.</font>'''


===Extending the Character Type===
===Extending the Character Type===
Line 265: Line 255:


You can extend any of the managed types that you can create pointers to in this manner.
You can extend any of the managed types that you can create pointers to in this manner.
====Extending the Character Type for AGS 3.0+====
The above example was originally written and designed around the 2.7x branch of AGS. As of AGS 3.0 however, we have the ability to use extender methods. For this particular example, I would recommend adding global extenders such as Character.GetHealth and Character.SetHealth instead of using a separate structure globally. You could still use the structure inside of your script (perhaps in a different script, where the extenders would actually be defined), but it would make it simpler to integrate your extensions into existing scripts by using extenders instead. Check them out if you're using a 3.x version of AGS!
==Dynamic Arrays Are Pointers Too==
In addition to the managed types, there are another type of pointer you should be aware of: [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags37.htm#DynamicArrays dynamic arrays]. You can create a dynamic array of the base types (such as int) or of pointers to a managed type (such as Character*). For creating a dynamic array of pointers, see {{link||Dynamic Array of Pointers}}.
Unlike the managed types, you use the '''new''' keyword to create a new array dynamically. The name you give it is treated as a pointer. The manual gives us this example:
  int characterHealth[];
  characterHealth = new int[Game.CharacterCount];
Initially, ''characterHealth'', just as with other pointers, holds the value of '''null'''. When you assign its value on the second line, you are telling it, as with other pointers, to point to the array that you've newly created.
This is particularly important if you pass a dynamic array as a function parameter. If you change the value of a dynamic array passed as a function parameter, it will change the value of the array itself. Keep in mind that the parameter is pointing to the same array as what you passed into the function. Very useful if it's what you want, but it can be confusing if you're not aware why it's happening.


=Closing=
=Closing=


So you came to me with questions, and I hope I've answered some of them at least. In any case I hope I answered the ones you had about pointers and their usage in AGS. If you have any questions or comments you can [http://americangirlscouts.org/bbc.com/yabb/index.php?action=pm;sa=send;u=2015 PM me] on the AGS forums, or email me at [mailto:monkey.05.06@gmail.com monkey.05.06@gmail.com] any time. Thanks for reading my article, and I hope you've enjoyed it as much as I enjoyed writing it.
So you came to me with questions, and I hope I've answered some of them at least. In any case I hope I answered the ones you had about pointers and their usage in AGS. If you have any questions or comments you can {{forumPM|2015|me}} on the AGS forums, or email me at {{email|monkey.05.06@gmail.com}} any time. Thanks for reading my article, and I hope you've enjoyed it as much as I enjoyed writing it.


monkey_05_06
monkey_05_06
=Notes=
{{footnote text|1|The String type is only defined as of AGS v2.71 and higher. Older versions use the now deprecated string type.}}
{{footnote text|2|The length for Strings is limited by your computer's physical memory. A String will take up 4 bytes of memory, plus 1 byte for each character it contains.}}
{{footnote text|3|Floating-point decimals won't always evaluate as you might expect when doing certain mathematical operations (this is due to their precision levels). See the manual entry on [https://www.adventuregamestudio.co.uk/manual/index.html?page=ags44.htm#DataTypes data types] for more information.}}
{{footnote text|4|AGS's managed types are those listed here. You cannot create a new managed type within AGS's scripts; to create a new managed type you would need to write a plugin. Some module writers may use the keyword ''managed'' to prevent users from creating instances of structs that are meant to be used statically. This does not however make the type managed. Only AGS's built-in managed types and any managed types created via plugins are actually managed, and therefore are the only types that can have pointers to them.}}
{{footnote text|5|Not all of the managed types are meant to have pointers to them.  Game, Maths, Parser, and Room do not need pointers (you can't even assign them a value).}}
{{footnote text|6|The asterisk doesn't necessarily have to be attached to the name of the pointer, such as "GUI *MyGUIPointer", it can also be attached to the data type itself, such as "GUI* MyGUIPointer". However, it will still be compiled as if it is attached to the name of the pointer, not the data type, so if you define multiple pointers at once, you will still need an asterisk for each pointer.}}
{{footnote text|7|In AGS you can't create a char*, as char isn't one of AGS's managed types. This type of pointer is used in scripting languages like C and C++. For storing string-literals AGS uses the String type (or the string type for AGS versions prior to 2.71).}}
{{footnote text|8|I have taken the liberty here of envisioning an integral system set up much as AGS 2.7+ is set up, only since it is an integral system it uses integers instead of pointers. In this example AGS structs still have member functions, and all other non-pointer-related functionality of AGS is the same.}}
{{footnote text|9|Structs can only have pointers as members in AGS 2.71 and later.}}


[[Category:Intermediate Tutorials]]
[[Category:Intermediate Tutorials]]

Navigation menu