Skip to content

feat: scripts can put the escort marker at a point near an object - #1573

Open
zabka14 wants to merge 3 commits into
OpenReliant:mainfrom
zabka14:feat/script-escort-marker
Open

zabka14 wants to merge 3 commits into
OpenReliant:mainfrom
zabka14:feat/script-escort-marker

Conversation

@zabka14

@zabka14 zabka14 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

A mission's SetEscortPoint shows the player the red rings and chevrons on an object. Scripts couldn't show them, and they can't add an object during a mission to stand the marker on. world.set_escort_point(object, offset, orientation) now shows the marker at a point in an object's frame, such as an approach point off a carrier, and the marker follows the object as it moves and turns.

  • create.Objects.escort_place: where the marker stands in the escort point's frame, or null for the object itself, as the game does. escort.Marker.frame places the marker there (math.Place.within).
  • world.set_escort_point sets the player's escort point and that place. Nil takes the marker away.
  • A mission's SetEscortPoint for the player's ship, or a new mission, puts the marker back on the object itself.
  • Docs: an Improvement note in docs/engine/missions.md, a section in scripting.md with an example, and the definitions.

Tests: the marker's placement in a turned frame, and the script function setting and clearing it. The whole suite passes locally with the transport built, and the reference and definitions match what openreliant hooks writes.

Left out: the place isn't sent to the other pilots in a network game, so a script's marker shows on the object itself there (#1582).

The mod that uses it, Improved Landing Sequence, is a pull request on openreliant-mods. It also needs #1572.

Closes #1581

world.set_escort_marker(object, offset, orientation) shows the red rings and chevrons that a
mission's SetEscortPoint shows, at a point in the object's frame rather than on the object
itself. The marker follows the object as it moves and turns. A mod can then show the player
where to fly, for example an approach point off a carrier, without an object of its own there,
since scripts can't add objects during a mission.

A mission's SetEscortPoint for the player's ship, or a new mission, puts the marker back on the
object itself. The offset isn't sent to the other pilots in a network game.

@vdmkenny vdmkenny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

An LLM wrote this review. I directed it, read it and approved it.

Thanks, this is a neat addition, and it fits the API well: it uses the Orientation type and the same frame as to_world, and SetEscortPoint still wins.

1. Name. The other world setters are named after the mission's commands (set_objective, set_variable), and this one sets the player's escort point. Please call it world.set_escort_point(object, offset, orientation).

2. Issue. Please open an issue for it and add Closes #N to the body.

The other world setters are named after the mission commands they match
(set_objective, set_variable), and this one sets the player's escort
point as SetEscortPoint does.
The place a script gives the marker isn't sent to the other pilots yet,
and the code and docs should say so where the gap is.
@zabka14
zabka14 requested a review from vdmkenny November 29, 2026 01:39

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scripts can show the escort marker at a point near an object

2 participants