Here is a list of all the variables of the 3DRad scripts and how to change and create them.
- float: normal number variable. Like: 5.61342.
You create and set this variable like this:
- int: this is a number variable, but only with whole numbers. Like: 6.0000.
You create and set this variable like this:
- string: this one can contains anything. It is meant for text. Like: Hello World!
You create and set this variable like this:
Mind the ' or the ".
- bool: this variable is true or false. Nothing else.
You create and set this variable like this:
- Quaternion: this variable contains a 3D rotation. There isn't really an easy way to view one.
You create and set this variable like this:
- Vector3: 3d location variable. Like: 10,5,23.
You create and set this variable like this:
There are different ways of creating multiple of the same variables. See this script:
That are the ones I could come up with. If I have missed one or you have a question, post it beneath this.
Hope it helps.
- float: normal number variable. Like: 5.61342.
You create and set this variable like this:
Code: [Select]
float FloatVariable = 0;
void Main()
{
FloatVariable = 12.3642;
}
- int: this is a number variable, but only with whole numbers. Like: 6.0000.
You create and set this variable like this:
Code: [Select]
int IntVariable = 0;
void Main()
{
IntVariable = 254;
}
- string: this one can contains anything. It is meant for text. Like: Hello World!
You create and set this variable like this:
Code: [Select]
string StringVariable = "HelloWorld!";
void Main()
{
StringVariable = "Hello Again!";
}
Mind the ' or the ".
- bool: this variable is true or false. Nothing else.
You create and set this variable like this:
Code: [Select]
bool BoolVariable = true;
void Main()
{
BoolVariable = false;
}
Note that a bool variable is false as default. - Quaternion: this variable contains a 3D rotation. There isn't really an easy way to view one.
You create and set this variable like this:
Code: [Select]
Quaternion QuaternionVariable;
void Main()
{
iQuaternionFromEulerAngles(QuaternionVariable,90,180,-90,"xyz");
}
Note that there isn't a simple way to set a Quaternion like with a float variable. You will need a function like this one. - Vector3: 3d location variable. Like: 10,5,23.
You create and set this variable like this:
Code: [Select]
Vector3 VectorVariable;
void Main()
{
VectorVariable = Vector3(2,1,3);
VectorVariable.x = 2;
VectorVariable.y = 1;
VectorVariable.z = 3;
}
Note that there are different ways to set a Vector. There are different ways of creating multiple of the same variables. See this script:
Code: [Select]
float FloatVariable1; //This one doesn't have a value set. The default is 0.
float FloatVariable2 = 1; //This one is set to 1.
float FloatVariable3, FloatVariable4; //Here multiple variables are created. Both are not set, so they are 0.
float FloatVariable5 = 10, FloatVariable6; //Here multiple variables are created. One is set to 10, the other one is default.
float FloatVariable7, FloatVariable8 = 20; //Here multiple variables are created. One is set to default, the other one is 20.
void Main()
{
}
That are the ones I could come up with. If I have missed one or you have a question, post it beneath this.
Hope it helps.