Skip to content

Feature: Implements the SEXPs that set the player's target and or clear it if necessary#7349

Open
LuytenFS wants to merge 8 commits intoscp-fs2open:masterfrom
LuytenFS:sexp-set-target-player-sexp
Open

Feature: Implements the SEXPs that set the player's target and or clear it if necessary#7349
LuytenFS wants to merge 8 commits intoscp-fs2open:masterfrom
LuytenFS:sexp-set-target-player-sexp

Conversation

@LuytenFS
Copy link
Copy Markdown
Contributor

@LuytenFS LuytenFS commented Apr 5, 2026

This PR implements the suggestions told here: #6460

Adds two new SEXP operators to allow mission designers to control the player's targeting state:

set-player-target takes a ship name as a required argument and an optional subsystem name. It sets the player's current target to the specified ship, and if a subsystem is provided, targets that subsystem as well. If the subsystem is destroyed, the ship is still targeted.

clear-player-target takes no arguments and clears the player's current target and subsystem target entirely.

Both operators are placed under Change → AI Control in the SEXP editor.

@wookieejedi wookieejedi added enhancement A new feature or upgrade of an existing feature to add additional functionality. sexps A feature or issue related to SEXPs labels Apr 5, 2026
Copy link
Copy Markdown
Contributor

@MjnMixael MjnMixael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small thing but otherwise it looks good! Nice work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature or upgrade of an existing feature to add additional functionality. sexps A feature or issue related to SEXPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants