home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Gameplay / Classes / ACTION_SetAlertness.uc < prev    next >
Text File  |  2003-12-11  |  1KB  |  40 lines

  1. class ACTION_SetAlertness extends ScriptedAction;
  2.  
  3. enum EAlertnessType
  4. {
  5.     ALERTNESS_IgnoreAll,            // ignore any damage, etc. (even the physics part)
  6.     ALERTNESS_IgnoreEnemies,        // react normally, but don't try to fight or anything
  7.     ALERTNESS_StayOnScript,            // stay on script, but fight when possible
  8.     ALERTNESS_LeaveScriptForCombat    // leave script when acquire enemy
  9. };
  10.  
  11. var(Action) EAlertnessType Alertness;
  12.  
  13. function bool InitActionFor(ScriptedController C)
  14. {
  15.     C.SetEnemyReaction(int(Alertness));
  16.     return false;    
  17. }
  18.  
  19. function string GetActionString()
  20. {
  21.     local String S;
  22.  
  23.     Switch(Alertness)
  24.     {
  25.         case ALERTNESS_IgnoreAll: S="Ignore all"; break;
  26.         case ALERTNESS_IgnoreEnemies: S="Ignore enemies"; break;
  27.         case ALERTNESS_StayOnScript: S="Stay on script"; break;
  28.         case ALERTNESS_LeaveScriptForCombat: S="Leave script for combat"; break;
  29.     }
  30.     return ActionString@S;
  31. }
  32.  
  33. defaultproperties
  34. {
  35.     Alertness=ALERTNESS_Normal
  36.     ActionString="set alertness"
  37.     bValidForTrigger=false
  38. }
  39.     
  40.