Difference between revisions of "Retail SEXPs"

From FreeSpace Wiki
Jump to: navigation, search
(New page: This page is a reference of SEXPs available in the retail version of FRED. To see the list of SEXPs that have been added, moved or modified by the SCP, go to the [[SCP SEXP...)
 
(small addition)
Line 1: Line 1:
This page is a reference of SEXPs available in the retail version of [[Portal:FRED|FRED]]. To see the list of SEXPs that have been added, moved or modified by the SCP, go to the [[SCP SEXP Reference|SCP SEXPs]] page.
+
This page is quick a reference of SEXPs available in the retail version of [[Portal:FRED|FRED]]. To see the list of SEXPs that have been added, moved or modified by the SCP, go to the [[SCP SEXP Reference|SCP 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.
  
 
==Objectives==
 
==Objectives==

Revision as of 00:59, 2 August 2007

This page is quick a reference of SEXPs available in the retail version of FRED. To see the list of SEXPs that have been added, moved or modified by the SCP, go to the SCP 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

is-destroyed-delay

Is destroyed delay (Boolean operator)
        Becomes true <delay> seconds after all specified ships have been destroyed.

Returns a boolean value; Takes 2 or more arguments:
        1:      Time delay in seconds (see above).
        Rest:   Name of ship (or wing) to check status of.

is-subsystem-destroyed-delay

Is subsystem destroyed delay (Boolean operator)
        Becomes true <delay> seconds after the specified subsystem of the specified ship is destroyed.

Returns a boolean value; Takes 3 arguments:
        1:      Name of ship the subsystem we are checking is on.
        2:      The name of the subsystem we are checking status of.
        3:      Time delay in seconds (see above).

is-disabled-delay

Is disabled delay (Boolean operator)
        Becomes true <delay> seconds after the specified ship(s) are disabled.  A ship is disabled when all of it's engine
subsystems are destroyed.  All ships must be diabled for this function to return true.

Returns a boolean value; Takes 2 or more arguments:
        1:      Time delay is seconds (see above).
        Rest:   Names of ships to check disabled status of.

Is-disarmed-delay

Is disarmed delay (Boolean operator)
        Becomes true <delay> seconds after the specified ship(s) are disarmed.  A ship is disarmed when all of it's turret
subsystems are destroyed.  All ships must be disarmed for this function to return true.

Returns a boolean value; Takes 2 or more arguments:
        1:      Time delay is seconds (see above).
        Rest:   Names of ships to check disarmed status of.

has-docked-delay

Has docked delay (Boolean operator)
        Becomes true <delay> seconds after the specified ships have docked the specified number of times.

Returns a boolean value; Takes 4 arguments:
        1:      The name of the docker ship
        2:      The name of the dockee ship
        3:      The number of times they have to have docked
        4:      Time delay in seconds (see above).

has-undocked-delay

Has undocked delay (Boolean operator)
        Becomes true <delay> seconds after the specified ships have undocked the specified number of times.

Returns a boolean value; Takes 4 arguments:
        1:      The name of the docker ship
        2:      The name of the dockee ship
        3:      The number of times they have to have undocked
        4:      Time delay in seconds (see above).

has-arrived-delay

Has arrived delay (Boolean operator)
        Becomes true <delay> seconds after the specified ship(s) have arrived into the mission

Returns a boolean value; Takes 2 or more arguments:
        1:      Time delay in seconds (see above).
        Rest:   Name of ship (or wing) we want to check has arrived.

has-departed-delay

Has departed delay (Boolean operator)
        Becomes true <delay> seconds after the specified ship(s) or wing(s) have departed from the mission by warping out.  If any 
ship was destroyed, this operator will never be true.

Returns a boolean value; Takes 2 or more arguments:
        1:      Time delay in seconds (see above).
        Rest:   Name of ship (or wing) we want to check has departed.

are-waypoints-done-delay

Waypoints done delay (Boolean operator)
        Becomes true <delay> seconds after the specified ship has completed flying the specified waypoint path.

Returns a boolean value; Takes 3 arguments:
        1:      Name of ship we are checking.
        2:      Waypoint path we want to check if ship has flown.
        3:      Time delay in seconds (see above).

ship-type-destroyed

Ship Type Destroyed (Boolean operator)
        Becomes true when the specified percentage of ship types in this mission have been destroyed.  The ship type is a generic
type such as fighter/bomber, transport, etc.  Fighters and bombers count as the same type.

Returns a boolean value; Takes 2 arguments:
        1:      Percentage of ships that must be destroyed.
        2:      Ship type to check for.

percent-ships-departed

percent-ships-departed
        Boolean function which returns true if the percentage of ships in the listed ships and wings which have departed is
greater or equal to the given percentage.  For wings, all ships of all waves are used for calculation for the total possible
ships to depart.

Takes 2 or more arguments:
        1:      Percentge of departed ships at which this function will return true.
        2+:     List of ships/wing whose departure status should be determined.

percent-ships-destroyed

percent-ships-destroyed
        Boolean function which returns true if the percentage of ships in the listed ships and wings which have been destroyed
is greater or equal to the given percentage.  For wings, all ships of all waves are used for calculation for the total possible
ships to be destroyed.

Takes 2 or more arguments:
        1:      Percentge of destroyed ships at which this function will return true.
        2+:     List of ships/wing whose destroyed status should be determined.

depart-node-delay

depart-node-delay
        Returns true N seconds after the listed ships depart, if those ships depart within the radius of the given jump node.
The delay value is given in seconds.

Takes 3 or more arguments:
        1:      Delay in seconds after the last ship listed departed before this expression can return true.
        2:      Name of a jump node
        3+:     List of ships to check for departure within radius of the jump node

destroyed-or-departed-delay

destroyed-or-departed-delay
        Returns true N seconds after all the listed ships or wings have been destroyed or have departed.

Takes 2 or more arguments:
        1:      Delay in seconds after the last ship/wing is destroyed or departed this expression can return true.
        2+:     Name of a ship or wing

Time

time-ship-destroyed

Time ship destroyed (Time operator)
        Returns the time the specified ship was destroy.

Returns a numeric value; Takes 1 argument:
        1:      Name of ship we want to check.

time-ship-arrived

Time ship arrived (Time operator)
        Returns the time the specified ship arrived into the mission.

Returns a numeric value; Takes 1 argument:
        1:      Name of ship we want to check.

time-ship-departed

Time ship departed (Time operator)
        Returns the time the specified ship departed the mission by warping out.  Being destroyed doesn't count departed.

Returns a numeric value; Takes 1 argument:
        1:      Name of ship we want to check.

time-wing-destroyed

Time wing destroyed (Time operator)
        Returns the time the specified wing was destroy.

Returns a numeric value; Takes 1 argument:
        1:      Name of wing we want to check.

time-wing-arrived

Time wing arrived (Time operator)
        Returns the time the specified wing arrived into the mission.

Returns a numeric value; Takes 1 argument:
        1:      Name of wing we want to check.

time-wing-departed

Time wing departed (Time operator)
        Returns the time the specified wing departed the mission by warping out.  All ships in the wing have to have warped out.   If any are destroyed, the wing can never be considered departed.

Returns a numeric value; Takes 1 argument:
        1:      Name of ship we want to check.

mission-time

Mission time (Time operator)
        Returns the current time into the mission.

Returns a numeric value.

time-docked

Time docked (Time operator)
        Returns the time the specified ships docked.

Returns a numeric value; Takes 3 arguments:
        1:      The name of the docker ship.
        2:      The name of the dockee ship.
        3:      The number of times they must have docked to be true.

time-undocked

Time undocked (Time operator)
        Returns the time the specified ships undocked.

Returns a numeric value; Takes 3 arguments:
        1:      The name of the docker ship.
        2:      The name of the dockee ship.
        3:      The number of times they must have undocked to be true.

Logical

true

True (Boolean operator)
	A true boolean state

Returns a boolean value.

false

False (Boolean operator)
	A false boolean state

Returns a boolean value.

and

And (Boolean operator)
	And is true if all of its arguments are true.

Returns a boolean value.  Takes 2 or more boolean arguments.

and-in-sequence

And in sequence (Boolean operator)
	Returns true if all of its arguments have become true in the order they are listed in.

Returns a boolean value.  Takes 2 or more boolean arguments.

or

Or (Boolean operator)
	Or is true if any of its arguments are true.

Returns a boolean value.  Takes 2 or more boolean arguments.

not

Not (Boolean operator)
	Returns opposite boolean value of argument (True becomes false, and false becomes true).

Returns a boolean value; Takes 1 boolean argument.

=

Equals (Boolean operator)
	Is true if all of it's arguments are equal.

Returns a boolean value; Takes 2 or more numeric arguments.

>

Greater than (Boolean operator)
	True if first argument is greater than the second argument.

Returns a boolean value; Takes 2 numeric arguments.

<

Less than (Boolean operator)
	True if first argument is less than the second argument.

Returns a boolean value; Takes 2 numeric arguments.

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.

has-time-elapsed

Has time elapsed (Boolean operator)
        Becomes true when the specified amount of time has elapsed (Mission time becomes greater than the specified time).
Returns a boolean value; Takes 1 numeric argument:
        1:      The amount of time in seconds.

Arithmetic

+

-

*

/

mod

rand

Status

is-cargo-known-delay

cap-subsys-cargo-known-delay

has-been-tagged-delay

is-tagged

num-kills

num-type-kills

num-class-kills

shield-recharge-pct

engine-recharge-pct

weapon-recharge-pct

shield-quad-low

secondary-ammo-pct

is-secondary-selected

is-primary-selected

shields-left

hits-left

hits-left-subsystem

distance

is-ship-visible

team-score

time-elapsed-last-order

skill-level-at-least

num-players

special-warp-dist

Change

modify-variable

special-warpout-name

do-nothing

add-goals

clear-goals

change-iff

protect-ship

unprotect-ship

beam-protect-ship

beam-unprotect-ship

send-message

self-destruct

end-campaign

sabotage-subsystem

repair-subsystem

set-subsystem-strength

invalidate-goal

validate-goal

send-random-message

transfer-cargo

exchange-cargo

good-rearm-time

allow-ship

allow-weapon

break-warp

fix-warp

never-warp

allow-warp

good-secondary-time

ship-invisible

ship-visible

ship-invulnerable

ship-vulnerable

red-alert

jettison-cargo-delay

fire-beam

beam-free

beam-free-all

beam-lock

beam-lock-all

turret-free

turret-free-all

turret-lock

turret-lock-all

add-remove-escort

awacs-set-range

send-message-list

cap-waypoint-speed

ship-guardian

ship-no-guardian

ship-vanish

turret-tagged-only

turret-tagged-clear

subsys-set-random

supernova-start

cargo-no-deplete

Conditionals

when

Debugging

error

Ai goals

ai-chase

ai-dock

ai-undock

ai-warp-out

ai-waypoints

ai-waypoints-once

ai-destroy-subsystem

ai-disable-ship

ai-disarm-ship

ai-guard

ai-chase-any

ai-evade-ship

ai-stay-near-ship

ai-keep-safe-distance

ai-ignore

ai-stay-still

ai-play-dead

Event/Goals

is-goal-incomplete

is-goal-true-delay

is-goal-false-delay

is-event-incomplete

is-event-true-delay

is-event-false-delay

is-previous-goal-true

is-previous-goal-false

is-previous-event-true

is-previous-event-false

Training

key-pressed

key-reset

targeted

speed

facing

facing-waypoint

order

waypoint-missed

waypoint-twice

path-flown

training-msg

flash-hud-gauge

special-check

secondaries-depleted

set-training-context-fly-path

set-training-context-speed