Attack Nearest Chat Command

Started by Dillusionist, August 05, 2013, 03:47:56 AM

Previous topic - Next topic

Dillusionist

Today I experienced a near TPK in Kobolds due to the burrowers being bugged and untargettable - your only hope against them is that your character's AI targets them next after killing their current foe, or summoning something. If EFU ends up adding new creatures via haks this is going to become even more of an issue; as creatures with hak pack models sometimes do not load and cannot be selected. I'm not sure of anything you can really do to stop this from happening.

What I'd like to suggest is to add a '/c attack' command that causes players to engage the nearest hostile in combat. Its not a perfect solution (since you still can't target with spells and feats), but its  something:

Quote from: void main()
{
     object oPC = OBJECT_SELF;
     object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 5.0, GetLocation(oPC), TRUE, OBJECT_TYPE_CREATURE);

         AssignCommand(oPC, ClearAllActions(FALSE));

         while (GetIsObjectValid(oEnemy))
         {
             if (GetIsEnemy(oEnemy, oPC) || GetIsEnemy(oPC, oEnemy))
                  {
                       AssignCommand(oPC, ActionAttack(oEnemy, FALSE));
                  }
             oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 5.0, GetLocation(oPC), TRUE, OBJECT_TYPE_CREATURE);
         }
}

(Please excuse the poor formatting on the script. Forum ate it. It works  as far as I know. Though it may cause PCs to potentially attack hostile  stealthed characters; I limited it to targets within 5 yards so it  couldn't be abused as a stealth-detector.)

Deception


Pentaxius

To prevent stealth detection and other exploit, I'd suggest adding it on the quest tool. That way it would be really fool proof.

Heavyfog

If the Burrowers cannot be fixed or the "/c attack" chat command not implemented please remove the Burrowers from that quest, they are BRUTAL.

Dillusionist

Quote from: Pentaxius;348049To prevent stealth detection and other exploit, I'd suggest adding it on the quest tool. That way it would be really fool proof.

Alternatively it could just be made to pass over things with stealth, sanctuary, or invisibility (NOT cut scene invisibility) effects active. I'm sure other situations with bugged enemies have/will potentially crop up.

Howlando

Would be nice to implement if someone has a chance. When I get a chance I'll try to fix the burrowers also.