FPI Script/FPI Usage Examples

The conditions test whether something is true. Each one of these conditions will return TRUE or FALSE. If it returns TRUE, then the next condition in the list of conditions separated by a comma is evaluated. If all conditions evaluate to true, then the actions are carried out.

Creates a random number between 0 and X and evaluates to true if that random number equals 1. This is useful for creating fidgeting in your character entities, for instance. While they are just standing around, you can have them fidget randomly every once in a while, for instance:

:STATE=0,RANDOM=30:ANIMATE=6

-this line checks to see if the state is zero (if the entity has been recently initialized or had its STATE variable set to 0 by another script or by another line in this script. Then, it creates a random number from 0 to 30. If that random number is 1 (1/30 of the time), then the animation listed will run, which, in this case, is number 6, which shows the character re-loading his or her weapon.