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
TS: Implement Hunter-Seeker Attempt 2 #12918 #21381
base: bleed
Are you sure you want to change the base?
Conversation
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.
Overall works fairly well. Could change the TrackedActor
to ActorIgnoreVisibility
. I feel like a new way of checking wether target is actor should be added to reduce changes of regressions.
I feel like vertical speed should be increased. It also flies like a plane; CanHover
and CanSlide
should be added to Aircraft
of the hunter seeker
hs.mp4
return; | ||
|
||
if (target == null || TargetIsInvalid()) | ||
SelectNewTarget(self); |
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.
Why isn't doing this in OnBecomingIdle
enough? Why again here?
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.
I did mention it in the original PR as well #21253 (comment). Though it will probably not work correctly if there's no target on becoming idle
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.
IIRC the issue was that Idle could fire before the attack tick so that is why it was done here, but I can double check.
{ | ||
target = self.World.Actors.Where(x => info.TargetRelationships.HasFlag(self.Owner.RelationshipWith(x.Owner)) && x.IsTargetableBy(self)).RandomOrDefault(self.World.SharedRandom); | ||
if (target != null) | ||
self.QueueActivity(false, new FlyAttack(self, Common.Traits.AttackSource.AutoTarget, Target.FromTrackedActor(target), forceAttack: false, null)); |
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.
Can't we just use Target.FromActor
here and add another optional parameter to the constructor of FlyAttack
? Problems in the warhead can be solved by adding a new field to DamageWarhead
that toggles if visibility is required.
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.
Recalculating the target might be an issue where it will lose track of it since it is in a fog IIRC. But I will double check on this too.
Implements #12918
Implements random hunter seeker behavior by adding a trait thats issues a FlyAttack command on spawn, if there is a valid target. The new TargetType was added so that we can ignore the shroud while doing target validity checks and so that we do not have to reimplement a whole new attack activity for this.