///////::///////////////////////////////////////////////// //:: Default On Attacked //:: NW_C2_DEFAULT5 //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* If already fighting then ignore, else determine combat round */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Oct 16, 2001 //:://////////////////////////////////////////////// #include "NW_I0_GENERIC" void main() { object oTarget=GetLastAttacker(); if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED) { ActionUseSkill(SKILL_HIDE,OBJECT_SELF); } if (GetDetectMode(OBJECT_SELF)==DETECT_MODE_ACTIVE) { ActionUseSkill(SKILL_SPOT,OBJECT_SELF); } SetTarget(oTarget); //Shout Attack my target, only works with the On Spawn In setup SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK); if (!GetIsFighting(OBJECT_SELF)) { ClearAllActions(); if (GetObjectSeen(oTarget)) { DetermineCombatRound(); } else { ActionMoveToObject(oTarget,TRUE,3.0); } } if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1005)); } }