ForceScript API Quick Reference: Difference between revisions

From DF21 Wiki
No edit summary
No edit summary
Line 44: Line 44:


== Dark Forces types ==
== Dark Forces types ==
{|
{| border=1 cellpadding=4px
|-
|-
| <code>Sector</code>
| <code>Sector</code>
| a sector
| a sector
| [[Script Sector]]
|-
|-
| <code>Wall</code>
| <code>Wall</code>
| a wall
| a wall
| [[Script Wall]]
|-
|-
| <code>Object</code>
| <code>Object</code>
| an object
| a game object (includes the player, NPCs, scenery, 3d models, projectiles, effects/explosions, items, etc.)
| [[Script Object]]
|-
|-
| <code>LevelTexture</code>
| <code>LevelTexture</code>
| a level texture
| a level texture
| [[Script Texture]]
|-
|-
| <code>Elevator</code>
| <code>Elevator</code>
| an elevator
| an elevator
| [[Script Elevator]]
|}
== Special objects ==
These are special ForceScript objects; there are (normally) only one of each in existence at any time.
{| border=1 cellpadding=4px
|-
! Object name
! Type
! Description
! Reference article
|-
| <code>game</code>
| Game
| Exposes properties and methods on the game currently being played
| [[Game Script API]]
|}
|}

Revision as of 07:08, 15 November 2026

Basic types

int signed 32-bit integer
uint unsigned 32-bit integer
float 32-bit floating point number
bool boolean
string string

Arrays and vectors

array an array
float2 a vector of 2 floats
float3 a vector of 3 floats
float4 a vector of 3 floats
float2x2 a 2x2 matrix of floats
float3x3 a 3x3 matrix of floats
float4x4 a 4x4 matrix of floats

Dark Forces types

Sector a sector Script Sector
Wall a wall Script Wall
Object a game object (includes the player, NPCs, scenery, 3d models, projectiles, effects/explosions, items, etc.) Script Object
LevelTexture a level texture Script Texture
Elevator an elevator Script Elevator

Special objects

These are special ForceScript objects; there are (normally) only one of each in existence at any time.

Object name Type Description Reference article
game Game Exposes properties and methods on the game currently being played Game Script API