Advertisement
Guest User

DECORATE

a guest
Jan 13th, 2014
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. //Melee Button Press
  2.  
  3. //This is a dummy actor so you don't need to define a new inventory item.
  4. //You can call this butts or whatever, it doesn't matter.
  5. Actor Boolean : Inventory
  6. {
  7. Inventory.MaxAmount 1
  8. +UNDROPPABLE
  9. -INVBAR
  10. }
  11.  
  12. //This is what's given when you press the melee button.
  13. Actor MeleePressed : Boolean {}
  14.  
  15. Actor StartMelee : CustomInventory
  16. {
  17. -INVBAR
  18. +UNDROPPABLE
  19. Inventory.Amount 1
  20. Inventory.MaxAmount 1
  21. States
  22. {
  23. Use:
  24. TNT1 A 0 A_GiveInventory("MeleePressed", 1)
  25. Fail
  26. }
  27. }
  28.  
  29. Actor StopMelee : CustomInventory
  30. {
  31. -INVBAR
  32. +UNDROPPABLE
  33. Inventory.Amount 1
  34. Inventory.MaxAmount 1
  35. States
  36. {
  37. Use:
  38. TNT1 A 0 A_TakeInventory("MeleePressed", 1)
  39. Fail
  40. }
  41. }
  42.  
  43. //This is being put in the actual gun code's ready state.
  44. Ready:
  45. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  46. MPTG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
  47. LOOP
  48. //That'll jump to a specific state (in this case "SPMelee") when the melee button is pressed.
  49. // In the melee system for TSP, I did this to let you Mag Grapple in-between combos.
  50. // This is placed after an actual attack.
  51.  
  52. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  53. TNT1 A 1 A_WeaponReady
  54. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  55. TNT1 A 1 A_WeaponReady
  56. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  57. TNT1 A 1 A_WeaponReady
  58. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  59. TNT1 A 1 A_WeaponReady
  60. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  61. TNT1 A 1 A_WeaponReady
  62. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  63. TNT1 A 1 A_WeaponReady
  64. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  65. TNT1 A 1 A_WeaponReady
  66. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  67. TNT1 A 1 A_WeaponReady
  68. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  69. TNT1 A 1 A_WeaponReady
  70. TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
  71. TNT1 A 1 A_WeaponReady
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement