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

  1. //=============================================================================
  2. // InventorySpot.
  3. //=============================================================================
  4. class InventorySpot extends SmallNavigationPoint
  5.     native;
  6.  
  7. cpptext
  8. {
  9.     virtual UBOOL IsIdentifiedAs(FName ActorName);
  10.     virtual AInventorySpot* GetAInventorySpot() { return this; } 
  11. }
  12.  
  13. var Pickup markedItem;
  14.  
  15. /* GetMoveTargetFor()
  16. Possibly return pickup rather than self as movetarget
  17. */
  18. function Actor GetMoveTargetFor(AIController B, float MaxWait)
  19. {
  20.     if ( (markedItem != None) && markedItem.ReadyToPickup(MaxWait) && (B.Desireability(markedItem) > 0) )
  21.         return markedItem;
  22.     
  23.     return self;
  24. }
  25.  
  26. /* DetourWeight()
  27. value of this path to take a quick detour (usually 0, used when on route to distant objective, but want to grab inventory for example)
  28. */
  29. event float DetourWeight(Pawn Other,float PathWeight)
  30. {
  31.     if ( (markedItem != None) && markedItem.ReadyToPickup(0) )
  32.         return markedItem.DetourWeight(Other,PathWeight);
  33. }    
  34.  
  35. defaultproperties
  36. {
  37.      bCollideWhenPlacing=False
  38.      bHiddenEd=true
  39. }
  40.