SCP SEXPs

From FreeSpace Wiki
Revision as of 01:21, 2 August 2007 by Shade (talk | contribs) (New page: This page is a reference of SEXPs that are only available in the SCP version of FRED. This also includes any retail SEXPs that have been modified from their original behavi...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is a reference of SEXPs that are only available in the SCP version of FRED. This also includes any retail SEXPs that have been modified from their original behaviour. To see the list of SEXPs that are available in retail FRED, go to the Retail SEXPs page. For tips and examples for how to properly use a SEXP when building missions, as well as warnings about potential pitfalls, follow the link to the detail page for the SEXP you are interested in.

Contents

Objectives

percent-ships-disabled

percent-ships-disarmed

Time

None

Logical

string-equals

string-greater-than

string-less-than

Arithmetic

rand-multiple

rand-multiple 
    Rand-multiple (Arithmetic operator) 
    Gets a random number. This number can and will change between successive calls to this sexp. 
  
    Returns a number. Takes 2 or 3 numeric arguments... 
    1: Low range of random number. 
    2: High range of random number. 
    3: (optional) A seed to use when generating numbers. (Setting this to 0 is the same as having no seed at all)

abs

abs 
    Absolute value (Arithmetic operator) 
    Returns the absolute value of a number. Takes 1 numeric argument.

min

min 
    Minimum value (Arithmetic operator) 
    Returns the minimum of a set of numbers. Takes 1 or more numeric arguments.

max

avg

Status

is-cargo

is-ship-stealthy

is-friendly-stealth-visible

is-iff

Is IFF (Boolean operator)
	True if ship{s} are all of the specified team.

Returns a boolean value; Takes 2 or more arguments:
/t1:	Team ("friendly", "hostile" or "unknown").
	Rest:	Name of ship to check.

is-ai-class

is-ship-type

is-ship-class

primary-ammo-pct

get-primary-ammo

get-secondary-ammo

distance-ship-subsystem

num-within-box

get-object-x

get-object-x
    get-object-x
    Returns the absolute X coordinate of a set of coordinates relative to a particular object (or object's subsystem). The input  
    coordinates are the coordinates relative to the object's position and orientation. If no input coordinates are specified,
    the coordinate returned is the coordinate of the object (or object's subsystem) itself. Takes 1 to 5 arguments...
    1: The name of a ship, wing, or waypoint.
    2: A ship subsystem (or "" if the first argument is not a ship - optional).
    3: The relative X coordinate (optional).
    4: The relative Y coordinate (optional).
    5: The relative Z coordinate (optional).

get-object-y

get-object-y
    get-object-y
    Returns the absolute Y coordinate of a set of coordinates relative to a particular object (or object's subsystem). The input
    coordinates are the coordinates relative to the object's position and orientation. If no input coordinates are specified,
    the coordinate returned is the coordinate of the object (or object's subsystem) itself. Takes 1 to 5 arguments...
    1: The name of a ship, wing, or waypoint.
    2: A ship subsystem (or "" if the first argument is not a ship - optional).
    3: The relative X coordinate (optional).
    4: The relative Y coordinate (optional).
    5: The relative Z coordinate (optional).

get-object-z

get-object-z
    get-object-z
    Returns the absolute Z coordinate of a set of coordinates relative to a particular object (or object's subsystem). The input
    coordinates are the coordinates relative to the object's position and orientation. If no input coordinates are specified,
    the coordinate returned is the coordinate of the object (or object's subsystem) itself. Takes 1 to 5 arguments...
    1: The name of a ship, wing, or waypoint.
    2: A ship subsystem (or "" if the first argument is not a ship - optional).
    3: The relative X coordinate (optional).
    4: The relative Y coordinate (optional).
    5: The relative Z coordinate (optional). 

was-promotion-granted

was-medal-granted

num-ships-in-battle

num-ships-in-wing

current-speed

is-nav-visited

distance-to-nav

script-eval-num

script-eval-string

num-assists

Change

script-eval

Messaging and Mission Goals

disable-builtin-messages

Disable builtin messages (Action operator)
        Turns the built in messages sent by command or pilots off
Takes 0 or more arguments....
If no arguments are supplied all built in messages are disabled
        All:    Name of ship to allow to talk.

enable-builtin-messages

Enable builtin messages (Action operator)
        Turns the built in messages sent by command or pilots on
Takes 0 or more arguments...
If no arguments are supplied any ships not given individual silence orders will be able
to send buiilt in messages. Command will also be unsilenced
        All:    Name of ship to allow to talk.

AI and IFF

remove-goal

change-ai-class

kamikaze

not-kamikaze

player-use-ai

player-not-use-ai

Subsystems and Cargo

set-cargo

set-scanned

set-unscanned

lock-rotating-subsystem

free-rotating-subsystem

reverse-rotating-subsystem

rotating-subsys-set-turn-time

set-primary-ammo

set-secondary-ammo

set-primary-weapon

set-secondary-weapon

lock-primary-weapon

unlock-primary-weapon

Ship Status

ship-guardian-threshold

ship-subsys-guardian-threshold

ship-stealthy

ship-unstealthy

friendly-stealth-invisible

friendly-stealth-visible

ship-targetable-as-bomb

ship-untargetable-as-bomb

ship-subsys-targetable

ship-subsys-untargetable

Beams and Turrets

turret-tagged-specific

turret-tagged-clear-specific

turret-change-weapon

turret-set-target-order

ship-turret-target-order

Mission and Campaign

end-mission

force-jump

grant-promotion

grant-medal

tech-add-ships

tech-add-weapons

tech-add-intel

tech-reset-to-default

Models and Textures

don't-collide-invisible

collide-invisible

change-ship-model

change-ship-class

deactivate-glow-points

activate-glow-points

deactivate-glow-maps

activate-glow-maps

deactivate-glow-point-bank

activate-glow-point-bank

Coordinate Manipulation

set-object-speed-x

set-object-speed-y

set-object-speed-z

set-object-position

set-object-facing

set-object-facing-object

Music and Sound

change-soundtrack

play-sound-from-table

play-sound-from-file

close-sound-from-file

Hud

hud-disable

hud-disable-except-messages

hud-set-text

hud-set-text-num

hud-set-coords

hud-set-frame

hud-set-color

radar-set-max-range

Cutscenes

set-cutscene-bars

unset-cutscene-bars

fade-in

fade-out

set-camera-position

set-camera-facing

set-camera-facing-object

set-camera-rotation

set-fov

reset-fov

reset-camera

show-subtitle

set-time-compression

reset-time-compression

lock-perspective

Jump Nodes

set-jumpnode-color

set-jumpnode-model

show-jumpnode

hide-jumpnode

Special

damaged-escort-priority

damaged-escort-priority-all

ship-vaporize

ship-no-vaporize

primitive-sensors-set-range

set-support-ship

special-warpout-name

ship-create

weapon-create

shields-on

shields-off

ship-tag

ship-untag

explosion-effect

warp-effect

ship-change-alt-name

set-death-message

Backgrounds and Nebula

mission-set-nebula

add-background-bitmap

remove-background-bitmap

add-sun-bitmap

remove-sun-bitmap

nebula-change-storm

nebula-toggle-poof

set-skybox-model

Conditionals

when-argument

every-time

every-time-argument

every-time-argument
    Every-time-argument (Conditional operator)
    This is a version of "when-argument" that will always evaluate its arguments. It's useful in situations where you need to
    repeatedly  check things that may become true more than once. Since this sexp will execute every time it's evaluated,
    you may need to use it as an  argument to "when" (not "when-argument") if you want to impose restrictions on how it's called.

    Takes 3 or more arguments...
    1: The arguments to evaluate (see any-of, all-of, random-of, etc.).
    2: Boolean expression that must be true for actions to take place.
    Rest: Actions to take when the boolean expression becomes true.

any-of

every-of

random-of

random-multiple-of

number-of

in-sequence

invalidate-argument

Ai goals

ai-ignore-new

Event/Goals

None

Autopilot/Navpoints

add-nav-waypoint

add-nav-ship

del-nav

hide-nav

restrict-nav

unhide-nav

unrestrict-nav

set-nav-visited

unset-nav-visited

set-nav-carry

unset-nav-carry

Training

None