View Single Post
  #2  
Old 08-08-2010, 01:33 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by khortez View Post
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 (ABC)
{
  
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.0temp.3temp.++)
{
  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.
Quote:
is random a event?
No, random(min, max) is a function which returns a random value which is somewhere between the given minimum and maximum values.
__________________
Skyld
Reply With Quote