Is-in-mission

From FreeSpace Wiki
Revision as of 14:36, 21 June 2012 by TopAce (talk | contribs) (added SEXP + note)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Checks whether a given ship is presently in the mission.  This sexp doesn't check the arrival list or exited status; it only tests to see if the ship is active.  This means that internally the sexp only returns SEXP_TRUE or SEXP_FALSE and does not use any of the special shortcut values.  This is useful for ships created with ship-create, as those ships will not have used the conventional ship arrival list.

Takes 1 or more string arguments, which are checked against the ship list.

Notes

If a ship, e. g. a warship, is in the process of going down, it will be considered "active" until it finishes its death sequence. If you want to check if a given ship is present AND alive, use num-ships-in-battle.