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

  1. class ACTION_ThrowWeapon extends ScriptedAction;
  2.  
  3. var(Action) vector WeaponVelocity;
  4.  
  5. function bool InitActionFor(ScriptedController C)
  6. {
  7.     if ( (C.Pawn == None) || (C.Pawn.Weapon == None) )
  8.         return false;
  9.  
  10.     if ( WeaponVelocity == vect(0,0,0) )
  11.         WeaponVelocity = C.Pawn.Velocity + vect(0,0,250) + 300 * vector(C.Pawn.Rotation);
  12.     C.Pawn.TossWeapon(WeaponVelocity);
  13.     return false;    
  14. }
  15.  
  16. defaultproperties
  17. {
  18.     ActionString="throw weapon"
  19. }