Loops:
An FPI script is executed every loop of the game. If your game is running at 30 fps, then the script is executed 30 times a second.
If statements:
Each line of an FPI script IS an If statement.
Take the following code as an example
:plrdistwithin=100:activateifused=1
In programming terminology, this would translate to
If (PlayerDistanceFromEntity <= 100) {
ActivateEntity(Entity.IfUsed, 1);
}
Arrays:
Impossible, but not usually needed.
Variables:
You can find tutorials on variables in the Official Community Guide, which you can find in a sticky in the FPSC Chat board.
Object Oriented Scripts:
No..... plain and simple.
Let's get this opened up, shall we? I don't like to refer to FPI as a "language". The script is not compiled, ever. It is interpreted by the engine during runtime. This means that you cannot declare things such as variables or classes. In the official version of FPSC, all of the variables are predeclared in the engine and are referenced by their "index" (a number), something I seriously dislike.
FPSC was written in DBP, a language that inherently is NOT Object Oriented, so it probably goes without saying that FPI will not be object oriented either.
You seem to be fairly familiar with programming, so here is my suggestion to you:
Stop using/Don't use FPSC. You are already at a point of understanding that you should be using a higher level tool to develop your games. In my eyes, FPSC is a learning tool for game development, to help people interested in the field get a handle on how things generally work in a game.
Since you are most familiar with javascript, I would suggest C++ or pure Java to you. If you'd like something a little easier to help you get into game development, then try using C++ with the DarkGDK libraries offered here.
Good luck out there!
The one and only,