I'm wondering what all functions are compatible with:
This.
like This.room, This.WalkSpeed, This.player etc...
I found this in the Manuel.
this
There are two uses for the this keyword.
1. Accessing members of the current struct
When you are creating custom structs, you use the "this" keyword inside member functions to refer to the current struct. For example:
Suppose you had this in your script header:
struct MyStruct {
int myValue;
import function MyMethod();
};
Then, in your main script, you could put this:
function MyStruct::MyMethod()
{
this.myValue = 5;
}
The MyStruct::MyMethod tells AGS that you are defining the function MyMethod which belongs to the struct MyStruct (the :: operator means "belongs to").
The code above will mean that when the MyMethod function is called, it sets the myValue variable to 5.
2. Declaring extender functions
Please see the Extender functions page for details.
Thanks Icy, Very intuitive explanation :D
Grim you can press F1 whilst in the editor to see the manual.
No prob.