Quote:
Originally Posted by khortez
First off can someone explain "for"? I thought I had a good grip on what it means but I'm not sure anymore.
|
PHP Code:
for (A; B; C)
{
D;
}
In this sequence, A is run once. Then as long as the condition B is true, C and D will run continuously. For example:
PHP Code:
for (temp.i = 0; temp.i < 3; temp.i ++)
{
echo(temp.i);
}
… is a simple counter. It starts by setting
temp.i = 0, and then as long as
temp.i < 3, then it will run
temp.i ++ (adding 1 onto temp.i) and then echoing the result.
Quote:
|
Whats the diffrence between player.x and vecx?
|
player.x is a variable containing the player's X position on the level.
vecx() is a function which determines horizontal vectors.
No,
random(min, max) is a function which returns a random value which is somewhere between the given minimum and maximum values.