I am assigning an NPC to attack a door, but he’s just standing there.
I set the door as plot, but didn’t change HP or hardness or anything else.
I don’t want NPC to break the door, just “fake” attack it.
@andgalf - The door was hostile originally, by default I believe. And I thought maybe because the creature is hostile too, he wouldn’t attack it, so changed door to Commoner as a test. I’ve tried both Hostile and Commoner on the door, but same result.
@Lance_Botelle script is in the on exit of a trigger, and I’ve put SendMessage calls in there so I do know it’s triggering. Tags are all good and unique.
Also, I tried the ClearAllActions call, as you show, both with FALSE and TRUE, but the keverek does not want to attack the door.
Can creatures generally be made to attack on placeables, or does ActionAttack only work when target is a creature? I tried googling this, but did not find any good results.
@Lance_Botelle - I’ll try those suggestions. I’m about to start BBQing though, I’ll have to run through that tonight!
@travus - I remember that thing about setting to environmental, then undoing it and the HP resetting to zero, so I definitely checked and door has HP.
The door can be opened by a PC, and checking the baked, it sure looks like enough room to reach the door and beat it.
Maybe this creature just isn’t in the mood…
void SetCombatOverrides( object oCreature, object oTarget, int nOnHandAttacks, int nOffHandAttacks, int nAttackResult, int nMinDamage, int nMaxDamage, int bSuppressBroadcastAOO, int bSuppressMakeAOO, int bIgnoreTargetReaction, int bSuppressFeedbackText );
void ClearCombatOverrides( object oCreature );
Yes, it will work!
But now the poor keverek focuses solely on attacking the door, even as I beat him silly with an axe.
Next I need to clear his combat overrides so that creature fights back on person who just attacked him.
SetCombatOverrides(oKev, oDoor, OVERRIDE_ATTACK_RESULT_HIT_SUCCESSFUL, -1,-1,-1,-1,TRUE, TRUE, TRUE, TRUE);
In my case I made the door PLOT, so I don’t care so much about what some of these arguments are, I just want keverek to pound on the door.
One thing, SetCombatOverrides has another parameter in there, it’s between oTarget and nOnHandAttacks and defines how you want the attacks to happen, to hit, to crit, to be parried, etc. I believe it is using OVERRIDE_ATTACK_RESULT* constants. It’s in the description but not in the prototype