Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Melee Button Press
- //This is a dummy actor so you don't need to define a new inventory item.
- //You can call this butts or whatever, it doesn't matter.
- Actor Boolean : Inventory
- {
- Inventory.MaxAmount 1
- +UNDROPPABLE
- -INVBAR
- }
- //This is what's given when you press the melee button.
- Actor MeleePressed : Boolean {}
- Actor StartMelee : CustomInventory
- {
- -INVBAR
- +UNDROPPABLE
- Inventory.Amount 1
- Inventory.MaxAmount 1
- States
- {
- Use:
- TNT1 A 0 A_GiveInventory("MeleePressed", 1)
- Fail
- }
- }
- Actor StopMelee : CustomInventory
- {
- -INVBAR
- +UNDROPPABLE
- Inventory.Amount 1
- Inventory.MaxAmount 1
- States
- {
- Use:
- TNT1 A 0 A_TakeInventory("MeleePressed", 1)
- Fail
- }
- }
- //This is being put in the actual gun code's ready state.
- Ready:
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- MPTG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
- LOOP
- //That'll jump to a specific state (in this case "SPMelee") when the melee button is pressed.
- // In the melee system for TSP, I did this to let you Mag Grapple in-between combos.
- // This is placed after an actual attack.
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
- TNT1 A 0 A_JumpIfInventory("MeleePressed",1,"SPMelee")
- TNT1 A 1 A_WeaponReady
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement