Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 |
//============================================================================= // BehaviorControllerInterf.uc // Created By: Mike Fox // Created On: 01/22/02 // $Author: Mfox $ // $Date: 12/16/02 10:31p $ // $Revision: 17 $ //============================================================================= class BehaviorControllerInterf extends Object within U2NPCControllerBasic; //----------------------------------------------------------------------------- enum EBCType { BC_AttackUpdate, // generic "reevaluate the current situation" with valid enemy BC_AttackCantFire, // can't fire in current state (e.g. disabled, odds) BC_BehaviorTimeOut, // time limit for current behavior is up BC_CoverNotFound, // tried to find cover and failed BC_CoverNotNeeded, // cover not needed -- current enemy isn't aggressive BC_CoverReachedCover, // reached a safe spot BC_EnemyAcquired, // became aware of an enemy for the first time (use acquisition state?) BC_EnemyCantReach, // can't get to enemy (pathing issue or enemy in water and I can't swim etc.) BC_EnemyChanged, // changed enemy to a different one (e.g. bigger threat) BC_EnemyInvalid, // current enemy is no longer valid (e.g. killed, gave up trying to find) BC_EnemyNotVisible, // lost LOS to current enemy BC_EnemyRecovered, // recovered enemy //BC_LeapRange, // check if should leap at enemy BC_MeleeRange, // check if should melee attack BC_MeleeRangeLost, // enemy moved out of melee range (while NPC in attackmelee state) BC_MeleeRangeLostHit, // enemy moved out of melee range (while NPC in attackmelee state) during successful melee attack (enemy was hit) BC_MeleeUpdate, // maybe change melee behavior BC_MeleeUpdateHit, // maybe change melee behavior during successful melee attack (enemy was hit) BC_MetaStateTimeOut, // time limit for current is up (only applies to some meta states) BC_StakeOutEnd, // abandoning stakeout (giving up) BC_TargetInvalid, // special target became invalid? BC_TookDamage, // took damage BC_UpdateInactive, // generic "what to do next" situation (no enemy) // "private" internal BC types (should only be used internally -- !!mdf-tbd: enforce this?) BC_CoverEnemyNotVisible,// enemy went out of LOS BC_CoverLeavingCover, // leaving cover BC_CoverRecoveredEnemy, // enemy recovered after moving out from cover spot (or enemy found NPC)? BC_CoverTimeOut, // cover state timed out -- select next state }; //----------------------------------------------------------------------------- function CleanupBC(); #debug function Update( EBCType BCTypeIn, string ContextStr ); #release function Update( EBCType BCTypeIn ); // behavior control function SetBCEnabled( bool bVal ); // Enable/disable behavior changes (e.g. so current state won't change). Enabled by default. function SetMinTimeOutDelay( float MinTimeOutDelay ); // set min time before state or metastate time out (e.g. to allow a melee animation to finish) function RestoreTimeOutDelays( float CheckBehaviorDelay, float CheckMetaStateDelay ); function float GetCheckBehaviorDelay(); function float GetCheckMetaStateDelay(); function GetTimeOutDelays( out float CheckBehaviorDelay, out float CheckMetaStateDelay ); function EnableBehavior( name TargetState ); // enables the given behavior in all behavior lists function DisableBehavior( name TargetState ); // disables the given behavior in all behavior lists function DisableAllBehaviorsExcept( name TargetState ); // disables the all behaviors but the given one in all behavior lists function bool GetBCEnabled(); // returns true if the behavior controller is currently enabled // firing control function SetNextCheckFireShotDelay( float SuggestedFireAgainDelay ); // override when firing will be checked next function StartFiring(); // attempt a shot immediately if not already firing function BlockFiring( float SuggestedFireAgainDelay ); // makes sure fire shot timer will end in this amount of time function float GetMinFiringDelay(); // returns 0.0 if currently firing, otherwise returns time left on check shot timer // debug function string GetExtendedStateInformation(); function string GetCurrentMetaStateName(); function string GetCurrentMetaStateNameShort(); //----------------------------------------------------------------------------- defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |