Jump to content

Abigail's "Attack At" command still sets a timer that blocks her from finding a target in weird unintuitive ways


hoxi
  • Pending

I've seen at least 3 reports commenting on the weird behavior, and there's probably some forum posts I missed.

Like this one and this one.

local function DoGhostAttackAt(inst, pos)
    if (inst.sg and inst.sg:HasStateTag("nocommand"))
            or (inst.components.health and inst.components.health:IsDead()) then
        return
    end

    if inst:HasTag("gestalt_hide") then
        if inst._playerlink then inst._playerlink.components.talker:Say(GetString(inst._playerlink, "ANNOUNCE_ABIGAIL_HIDING")) end
        return
    end

	local px, py, pz = pos:Get()
	local targets_near_position = TheSim:FindEntities(px, py, pz, 2, ATTACK_MUST_TAGS, ATTACK_NO_TAGS)
	if #targets_near_position > 0 then
		inst.components.combat:SetTarget(targets_near_position[1])
	end

    inst.components.aura:Enable(false)

	inst.sg:GoToState("abigail_attack_start", pos)

    local timer = inst.components.timer
    if timer:TimerExists("block_retargets") then
        timer:SetTimeLeft("block_retargets", 10)
    else
        timer:StartTimer("block_retargets", 10)
    end
end

I feel like the "block_retargets" timer should only start or be reset if a target was found with the command, and if no target is found, don't start it, and attempt to stop it in case it's active there. Abigail should also probably drop her current target if no target is found.

 

Along with this, if her current target is dropped (meaning target is too far away according to brain logic, or target died, or can't be targeted, etc), she should stop said timer so she can resume normal combat, instead of weirdly doing nothing for 10 seconds since the command was issued, with no indication to the player. You could listen for the "droppedtarget" event for this.

 

Although one thing is that even with the stuff above being tweaked to be more intuitive, her brain logic could also check for the timer existing to avoid dropping targets (unless an aura test fails) and have her focus her current target from the command. This might lead to her being too overzealous when soothed (defensive) so maybe don't do it for that behavior, but it would make sense when riled up (aggressive).

 

Note that in all these cases, she can still gain or switch targets by other means while the timer is up (like by getting hit), she just can't gain new targets by checking around her, so the behavior isn't even consistent.


Steps to Reproduce
  • When soothed, have Abigail targeting something and then issue the Attack At command away from the target, then move away from the target yourself.
  • (alternative) When soothed, use the Attack At command to have Abigail target a somewhat far away enemy, so that she will deaggro upon exiting the swoop state.
  • Notice how she now can't gain a target for 10 seconds, unless she gets hit (and haven't verified, but likely also from having Wendy getting hit or doing an attack action, similarly to other followers).
  • Like 1



User Feedback


These issues have been fixed with 647828, Abigail's behavior with the command should be way more intuitive!

Thank you so much! I hope you enjoy your holidays and break!

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...