HiddenTradition_PRC8/_module/nss/hx_cut_attack4.nss
2024-06-20 15:47:42 -04:00

43 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name hx_cut_attacking
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This will keep scriptless chars fighting
in the cutscenes.
*/
//:://////////////////////////////////////////////
//:: Created By: Brad Prince
//:: Created On: Sept, 29, 2003
//:://////////////////////////////////////////////
#include "x2_inc_cutscene"
void AttackEnemy();
void main()
{
object oPC = GetFirstPC();
int iCut = CutGetActiveCutsceneForObject(oPC);
if(iCut < 1)
{
if(GetArea(OBJECT_SELF) == GetArea(oPC))
{
AttackEnemy();
DelayCommand(1.0, AttackEnemy());
DelayCommand(2.0, AttackEnemy());
DelayCommand(3.0, AttackEnemy());
DelayCommand(4.0, AttackEnemy());
DelayCommand(5.0, AttackEnemy());
}
}
}
void AttackEnemy()
{
if(GetCurrentAction() != ACTION_ATTACKOBJECT)
{
object oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
ActionAttack(oEnemy);
}
}