Advertisement
Guest User

X Is A Changeling

a guest
Oct 9th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. class XIsAChangeling extends TournamentPickup;
  2.  
  3.  
  4. event Landed(Vector HitNormal)
  5. {
  6. Super.Landed(HitNormal);
  7. SetPhysics(PHYS_None);
  8. }
  9.  
  10. function float DetourWeight(Pawn Other, float PathWeight)
  11. {
  12. return 0;
  13. }
  14.  
  15. function float BotDesireability(Pawn Bot)
  16. {
  17. return 0;
  18. }
  19.  
  20. auto state Pickup
  21. {
  22. function bool ReadyToPickup(float MaxWait)
  23. {
  24. return true;
  25. }
  26.  
  27. //ValidTouch()
  28. //Validate touch (if valid return true to let other pick me up and trigger event).
  29.  
  30. function bool ValidTouch( actor Other )
  31. {
  32. // make sure its a live player
  33. if ( (Pawn(Other) == None) || !Pawn(Other).bCanPickupInventory || (Pawn(Other).DrivenVehicle == None && Pawn(Other).Controller == None) )
  34. return false;
  35.  
  36. // make sure not touching through wall
  37. if ( !FastTrace(Other.Location, Location) )
  38. return false;
  39.  
  40. // make sure game will let player pick me up
  41. if( Level.Game.PickupQuery(Pawn(Other), self) )
  42. {
  43. TriggerEvent(Event, self, Pawn(Other));
  44. return true;
  45. }
  46. return false;
  47. }
  48.  
  49. // When touched by an actor.
  50. function Touch( actor Other )
  51. {
  52. }
  53.  
  54. // Make sure no pawn already touching (while touch was disabled in sleep).
  55. function CheckTouching()
  56. {
  57. }
  58.  
  59. function Timer()
  60. {
  61. }
  62.  
  63. function BeginState()
  64. {
  65. UntriggerEvent(Event, self, None);
  66. }
  67.  
  68. function EndState()
  69. {
  70. }
  71.  
  72. Begin:
  73. CheckTouching();
  74. }
  75.  
  76.  
  77. state FallingPickup
  78. {
  79. function CheckTouching()
  80. {
  81. }
  82.  
  83. function bool ValidTouch( actor Other )
  84. {
  85. // make sure its a live player
  86. if ( (Pawn(Other) == None) || !Pawn(Other).bCanPickupInventory || (Pawn(Other).DrivenVehicle == None && Pawn(Other).Controller == None) )
  87. return false;
  88.  
  89. // make sure not touching through wall
  90. if ( !FastTrace(Other.Location, Location) )
  91. return false;
  92.  
  93. // make sure game will let player pick me up
  94. if( Level.Game.PickupQuery(Pawn(Other), self) )
  95. {
  96. TriggerEvent(Event, self, Pawn(Other));
  97. return true;
  98. }
  99. return false;
  100. }
  101.  
  102. // When touched by an actor.
  103. function Touch( actor Other )
  104. {
  105. }
  106.  
  107. function Timer()
  108. {
  109. }
  110.  
  111. function BeginState()
  112. {
  113. }
  114.  
  115. function EndState()
  116. {
  117. }
  118. }
  119.  
  120. function Timer()
  121. {
  122. }
  123.  
  124. function AnnouncePickup( Pawn Receiver )
  125. {
  126. }
  127.  
  128. defaultproperties
  129. {
  130. DrawScale=0.5
  131. DrawType=DT_StaticMesh
  132. StaticMesh=StaticMesh'XGame_rc.WildcardChargerMesh'
  133. Physics=PHYS_None
  134. LifeSpan=0.0
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement