General & Miscellaneous FPI Commands

The following conditions and actions are applicable to all general entities.

Return to FPI Scripting.

CONDITIONS

ACTIVATED=X

Description: Is true when the activation value of the entity is equal to X.

Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

Example: :activated=1:state=1

ALPHAFADEEQUAL=X

Description: Is true when the alpha fade/tranparency value of the entity equals X.

Range: X = 0 to 100

Example: :alphafadeequal=0:destroy

ALWAYS

Description: Is permanently true.

Example: :always:shootplr

ANYFURTHER=X

Description: Is true when any entity is further away than X units (100 units = 1 segment).

<p style="margin: 0cm 0cm 6pt 40px">Range: X 0 to 540,000 (maximum distance in level)

<p style="margin: 0cm 0cm 6pt 40px">Example: :anyfurther=200:decalphade=100

<p style="margin: 0cm 0cm 6pt">ANYWITHIN=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when any entity is within X units (100 units = 1 segment).

<p style="margin: 0cm 0cm 6pt 40px">Range: X > 0.

<p style="margin: 0cm 0cm 6pt 40px">Example: :anywithin=50:activateifused

<p style="margin: 0cm 0cm 6pt">CANTAKE

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true if the entity can be taken by the player.

<p style="margin: 0cm 0cm 6pt 40px">Example: :cantake:playertake

<p style="margin: 0cm 0cm 6pt">NEVER

<p style="margin: 0cm 0cm 6pt 40px">Description: Is never true.

<p style="margin: 0cm 0cm 6pt 40px">Example: :never:destroy

<p style="margin: 0cm 0cm 6pt">QUANTITY=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when the number of ammo clips currently carried by the entity equals X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to any value.

<p style="margin: 0cm 0cm 6pt 40px">Example: :quantity=1:state=1

<p style="margin: 0cm 0cm 6pt">RANDOM=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when a random number between 0 and X equals 0. I.e. random=1 gives a 50% chance of being true, whereas random=100 gives a 1% chance of being true.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 1 to anything, although setting above 1,000 will make this conditions very unlikely to be true.

<p style="margin: 0cm 0cm 6pt 40px">Example: :random=1:incstate

<p style="margin: 0cm 0cm 6pt">SHADERVARIABLE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when the FX shader variable for the entity is set to X. This condition is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 1 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :shadervariable=1:state=1

<p style="margin: 0cm 0cm 6pt">SHADERVARIABLEGREATER=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when the FX shader variable for the entity is greater than X. This condition is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :shadervariablegreater=1:state=1

<p style="margin: 0cm 0cm 6pt">SHADERVARIABLELESS=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when the FX shader variable for the entity is less than X. This condition is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :shadervariableless=1:state=1

<p style="margin: 0cm 0cm 6pt">STATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true when the FPI state is equal to X

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:shootplr

<p style="margin: 0cm 0cm 6pt">UNDERWATER=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Is true in the following conditions:

<p style="text-indent: -1cm; margin: 0cm 0cm 6pt 120px; mso-list: l0 level1 lfo2; tab-stops: list 46.35pt">· When the entity is under the water and X=1.

<p style="text-indent: -1cm; margin: 0cm 0cm 6pt 120px; mso-list: l0 level1 lfo2; tab-stops: list 46.35pt">· When the entity is above the water and X=0

<p style="margin: 0cm 0cm 6pt 40px">Example: :underwater:explode

<p style="margin: 0cm 0cm 6pt">ACTIONS

<p style="margin: 0cm 0cm 6pt">ACTIVATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Sets the activation value of the entity to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:activate=1

<p style="margin: 0cm 0cm 6pt">ACTIVATEIFUSED=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Activates the entity nominated in the entity’s “If Used” field and sets the activated entity’s activation value to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:activateifused=1

<p style="margin: 0cm 0cm 6pt">ACTIVATEIFUSEDNEAR=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Activates the entity nominated in the entity’s “If Used” field IF THE “If Used” entity is within 80 units (100 units = 1 segment) and sets the activated entity’s activation value to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:activateifusednear=1

<p style="margin: 0cm 0cm 6pt">ACTIVATETARGET=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Activates the entity’s target entity and sets the activated entity’s activation value to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:activatetarget=1

<p style="margin: 0cm 0cm 6pt">ALTTEXTURE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Switches the texture of the entity as defined during the level editor.

<p style="text-indent: -49.65pt; margin: 0cm 0cm 6pt 120px">Range: X = 0 normal texture

<p style="text-indent: -49.65pt; margin: 0cm 0cm 6pt 120px">X = 1 alternative texture

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:alttexture=1 CARRYALL

<p style="margin: 0cm 0cm 6pt 40px">Description: This actions is design to be used by Lifts and allows the lift entity to carry all entities within the segment it occupies. Collision is switched OFF for the lift entity and the carried entities when this is called.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:carryall

<p style="margin: 0cm 0cm 6pt">COLOFF

<p style="margin: 0cm 0cm 6pt 40px">Description: Disables collision detection for the entity.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:coloff

<p style="margin: 0cm 0cm 6pt">COLON

<p style="margin: 0cm 0cm 6pt 40px">Description: Enables collision detection for the entity.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:colon

<p style="margin: 0cm 0cm 6pt">DECALPHAFADE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This decreases the alpha fade/transparency value of the entity. X is defined as the target alpha fade value.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:decalphafade=0

<p style="margin: 0cm 0cm 6pt">DECSHADERVARIABLE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This action decreases the shader variable by X. This action is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to ?

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:decshadervariable=1

<p style="margin: 0cm 0cm 6pt">DESTROY

<p style="margin: 0cm 0cm 6pt 40px">Description: This destroys the entity and removes it from the level. If re-spawn parameters have been set, these are now triggered.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:destroy

<p style="margin: 0cm 0cm 6pt">EXPLODE

<p style="margin: 0cm 0cm 6pt 40px">Description: This causes the entity to explode allowing it to cause damage. It does not destroy the entity.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:explode

<p style="margin: 0cm 0cm 6pt">FLOATRATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This defines the height to which the entity floats. This action will cause the entity to oscillate up and down from its original position to a height of 2X units. The rate oscillation can not be changed using script commands.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 2,000 (above 2,000 is possible, but this places entity over 20 segments high).

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:floatrate=1

<p style="margin: 0cm 0cm 6pt">FLOORLOGIC

<p style="margin: 0cm 0cm 6pt 40px">Description: Prevents entity from leaving y (up-down) position.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:floorlogic

<p style="margin: 0cm 0cm 6pt">HIDESHADOW=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This switches the entity’s shadow parameter ON or OFF

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">Range: X = 0 – Switch shadow ON,

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">X = 1 – Switch shadow OFF.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=1:hideshadow=1

<p style="margin: 0cm 0cm 6pt">INCALPHAFADE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This increases the alpha fade/transparency value of the entity. X is defined as the target alpha fade value.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:incalphafade=100

<p style="margin: 0cm 0cm 6pt">INCSHADERVARIABLE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This action increases the shader variable by X. This action is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:incshadervariable=1

<p style="margin: 0cm 0cm 6pt">INCSTATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This increases the state value of the FPI by X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :random=1:incstate=1

<p style="margin: 0cm 0cm 6pt">ISALTAMMO

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the ammo entity to provide alternative fire ammo.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=1:isaltammo

<p style="margin: 0cm 0cm 6pt">NOBULLETCOL

<p style="margin: 0cm 0cm 6pt 40px">Description: This switches the bullet collision for the entity OFF.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=1:nobulletcol

<p style="margin: 0cm 0cm 6pt">NONE

<p style="margin: 0cm 0cm 6pt 40px">Description: This performs no action.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:none

<p style="margin: 0cm 0cm 6pt">NOGRAVITY

<p style="margin: 0cm 0cm 6pt 40px">Description: This switches off the effect of gravity on the entity.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:nogravity

<p style="margin: 0cm 0cm 6pt">ROTATEIY=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity to rotate around it’s Y-axis by an increment of X degrees. For example, if the entity is already rotated 45° about the Y-axis, using rotateiy=45 will rotate the entity to 90°. If the entity is set to always active, the rotation will be smooth. If the entity is not set to always active, the rotation will only be smooth if the player is close to the entity.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = -360 to 360 (larger angles can be used, but are not necessary)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:rotateiy=180

<p style="margin: 0cm 0cm 6pt">RUNDECAL=X

<p style="margin: 0cm 0cm 6pt 40px">Description: Sets the decal mode for the entity to X. If particles are disabled, the decal mode is set to 2.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to ???

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=1:rundecal=1

<p style="margin: 0cm 0cm 6pt">RUNFPI=FilePath

<p style="margin: 0cm 0cm 6pt 40px">Description: Starts and runs a new *.fpi defined by X. The child.fpi runs in place of the parent.fpi, not in parallel. To return to the parent.fpi, the parent.fpi must be called by the child.fpi using “runfpi=”

<p style="margin: 0cm 0cm 6pt 40px">Range: FilePath = File path to new *.fpi.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=10:runfpi=MyGameScripts/shoot.fpi

<p style="margin: 0cm 0cm 6pt">RUNFPIDEFAULT=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This stars and runs a new *.fpi as defined in the APPEAR, MAIN, DESTROY and SHOOT fields in the entity properties deinfed in the level editor. The new.fpi runs in place of the old.fpi, not in parallel. To return to the old.fpi, the “runfpidefaul=” actions must be called stating the correct value for X.

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">Range: X = 0 – run appear script,

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">X = 1 – run main script,

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">X = 2 – run destroy script,

<p style="text-indent: -42.55pt; margin: 0cm 0cm 6pt 120px">X = 3 – run shoot script

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:runfpidefault=1

<p style="margin: 0cm 0cm 6pt">SELECTSHADERVARIABLE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This action selects the shader variable. This action is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:selectshadervariable=1

<p style="margin: 0cm 0cm 6pt">SETALPHAFADE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the alpha fade/transparency property of the entity to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:setalphafade=100

<p style="margin: 0cm 0cm 6pt">SETIFUSED=EntityName

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s “If Used” parameter to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: EntityName = Name of entity to activate if used.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:setifused=ExplodingBarrel

<p style="margin: 0cm 0cm 6pt">SETSHADERVARIABLE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This action sets the selected shader variable to X. This action is not officially supported or documented and is only available for experimental use only.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to unknown.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:setshadervariable=1

<p style="margin: 0cm 0cm 6pt">SETTARGET

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s possible target to its actual target.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:settarget

<p style="margin: 0cm 0cm 6pt">SETTARGETNAME=EntityName

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s target to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: EntityName = Target entity’s name

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:settargetname=EmptyBox

<p style="margin: 0cm 0cm 6pt">SETUSEKEY=EntityName

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s “Use Key” parameter to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: EntityName = Key name

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:settusekey=BigRustyKey

<p style="margin: 0cm 0cm 6pt">SHAPEDECAL=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This changes the decal mode of the entity to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to max value?

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:shapedecal

<p style="margin: 0cm 0cm 6pt">SPAWNOFF

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s “Spawn at Start” parameter to NO.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:spawnoff

<p style="margin: 0cm 0cm 6pt">SPAWNON

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s “Spawn at Start” parameter to YES.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:spawnon

<p style="margin: 0cm 0cm 6pt">SPINRATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the entity’s spin rate to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to any value, although setting higher than current FPS makes the entity appear strange.

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:spinrate=1

<p style="margin: 0cm 0cm 6pt">STATE=X

<p style="margin: 0cm 0cm 6pt 40px">Description: This sets the FPI state value to X.

<p style="margin: 0cm 0cm 6pt 40px">Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)

<p style="margin: 0cm 0cm 6pt 40px">Example: :state=0:state=1

<p style="margin: 0cm 0cm 6pt">Return to FPI Scripting.