how to fix whirlwind attack, courtesy of an old friend.
note the fix is at the bottom and commented out in case you forget to test before release.
also note that the speak string command there is for debugging and you'd have to set oAttackTarget to use that line...
the clear all actions is all you really need, if you don't want the player to have to re-target then you can use the last line.
//::///////////////////////////////////////////////
//:: x2_s2_whirl.nss
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Performs a whirlwind or improved whirlwind
attack.
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-08-20
//:://////////////////////////////////////////////
//:: Updated By: GZ, Sept 09, 2003
void main()
{
object oSelf = OBJECT_SELF;
int bImproved = (GetSpellId() == 645);// improved whirlwind
/* Play random battle cry */
int nSwitch = d10();
switch (nSwitch)
{
case 1: PlayVoiceChat(VOICE_CHAT_BATTLECRY1); break;
case 2: PlayVoiceChat(VOICE_CHAT_BATTLECRY2); break;
case 3: PlayVoiceChat(VOICE_CHAT_BATTLECRY3); break;
}
// * GZ, Sept 09, 2003 - Added dust cloud to improved whirlwind
if (bImproved)
{
effect eVis = EffectVisualEffect(460);
DelayCommand(1.0f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,OBJECT_SELF));
}
DoWhirlwindAttack(TRUE,bImproved);
// * make me resume combat
//DelayCommand(3.8, ClearAllActions(TRUE));
//SpeakString(GetName(oAttackTarget));
//DelayCommand(4.0, AssignCommand(oSelf,ActionAttack(oAttackTarget, FALSE)));
}