Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow vehicles to retain target on move command #1299

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Jul 7, 2024

Retain target on movement command

  • It is now possible for vehicles to retain their target when issued movement command by setting KeepTargetOnMove to true.
    • Note that no check is done whether or not the vehicle or the weapon can actually fire while moving, this is on modder's discretion.
    • The target is automatically reset if the vehicle moves beyond the weapon's range from the target.
  • KeepTargetOnMove.ExtraDistance can be used to modify the distance considered 'out of range' from target (it is added to weapon range), negative values work to reduce the distance.

In rulesmd.ini:

[SOMEVEHICLE]                     ; VehicleType
KeepTargetOnMove=false            ; boolean
KeepTargetOnMove.ExtraDistance=0  ; floating point value, distance in cells

Copy link

github-actions bot commented Jul 7, 2024

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Starkku Starkku force-pushed the feature/keeptargetonmove branch 2 times, most recently from cca7ffb to 5cf81f0 Compare July 12, 2024 13:09
@TaranDahl
Copy link
Contributor

Very useful improvement.
Adding a global version tag in [General] would be better I think, as the flags may be used by many UnitTypes.

@mevitar
Copy link

mevitar commented Sep 23, 2024

In this build I had a weird instance of a subterranean harvester getting stuck underground and only able to move around, but never back up to the ground.
And after a while, the game crashed, but it might not be related to that harvester. Here's the link:
https://drive.google.com/file/d/1Zbul8kBow3Q-zuzHt__L86NkuqHpqYLJ

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

Successfully merging this pull request may close these issues.

3 participants