-
Notifications
You must be signed in to change notification settings - Fork 737
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
Aircraft - Drone "Follow Unit" Waypoint Action #9889
Aircraft - Drone "Follow Unit" Waypoint Action #9889
Conversation
Looks like UGV Follow code is broken and a known issue. I guess an all-round solution will require some sort of follow-mode PFH that updates a move/hold waypoint, which should also allow scripting a "min distance to follow" behaviour, though a native scripting method would be preferable. |
Ended up implementing the selectable follow distance via a simple distance check in the PFH, should be pretty efficient already but could be optimized further. Feedback appreciated. |
I guess the current implementation of a separate "Follow Distance" interaction (just like for Loiter Altitude) is best. |
I think this is pretty much complete. |
I want to see that ticket be included in the code, explaining why a PFH even needs to be added. |
I really don't know: I don't use drones at all and frankly I don't care for them. We need other opinions here. |
I'll test later this week. Code looks good at a glance post-changes, but I haven't looked too hard. |
I could see someone saying this is too strong because the drone will continue to follow even if it doesn't have line of sight |
The vanilla following was similarly OP, it would get stuck sometimes if the drone's turret wasn't looking at the target, but once you'd lock it with Ctrl+T and "revealed it" with T, the AI would know about it even when in buildings and follow with few interruptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrschick I can't push any changes on your branch.
I believe it's because you don't allow contributors to commit to PR branches directly. If you enable it, it allows us to merge master when we want to test and makes it easier to commit small changes.
I want to merge the master branch, along side with some minor changes (code cleanup, header fix) and I don't want to have to do this via the website, so please allow me to push changes.
@johnb432 Unfortunately maintainer edits cannot be enabled for organization PRs. |
Since FOLLOW WP would stop working on AI Soldiers after some time.
Only visible when a HOLD waypoint is selected, which is pretty much always going to have been created by the "Follow" interaction.
Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
fd2ac17
to
3ca7b92
Compare
Running |
Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>
* Fix "Recharge" interaction showing on destroyed drone * Add "Follow Unit" action * Improve condition check * UGV Following via PFH that updates WP Pos * Use HOLD WP for all Follow Actions Since FOLLOW WP would stop working on AI Soldiers after some time. * Allow selecting a follow distance * Follow Distance under separate interaction, just like Loiter Alt Only visible when a HOLD waypoint is selected, which is pretty much always going to have been created by the "Follow" interaction. * Localize "Follow" Interaction * Show structuredText Hint when following/changing distance * Variable for cursorTarget Reuse * Better isKindOf condition use * Make "Ship"-kind vehicles followable * Clean up Comments and systemChat Debugs * Comment explanation for custom PFH solution over vanilla "Follow"-WP * Trim excess brackets from setWaypointPosition argument Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> * Broader determination for UGV follow distances Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Prevent infinite PFH loop if follow target is deleted Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Delete Follow WP when PFH terminates * The ternary rules Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Various requested changes Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
When merged this pull request will:
cursorTarget
) and creates a persistent "follow" type waypoint;