Custom Weapons cannot be scrolled too on number keys

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Custom Weapons cannot be scrolled too on number keys

Post by Hidden Hands »

Same old problem again... I have replaced the rocketlauncher with a new gun. Now when I use the IDKFA cheat, I cannot select it with the number key it SHOULD be assigned too. Can someone tell me what the Hell is wrong with my DECORATE code?

Code: Select all

ACTOR SplatterFucker : RocketLauncher replaces RocketLauncher
{
  Weapon.SelectionOrder 2500
  Weapon.AmmoUse 1
  Weapon.AmmoGive 6
  Weapon.AmmoType "RocketAmmo"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "You got the splatterfucker! Fuck 'em up!"
  Tag "$TAG_ROCKETLAUNCHER"
  States
  {
  Ready:
    SPFC A 1 A_WeaponReady
    Loop
  Deselect:
    SPFC A 1 A_Lower
    Loop
  Select:
    SPFC A 1 A_Raise
    Loop
  Fire:
    SPFC A 4
    SPFC B 6 A_FireMissile
    SPFC C 4
	SPFC D 1
	SPFC C 1
    SPFC B 5 A_ReFire
    Goto Ready
  Flash:
    SPFC A 7 Bright A_Light1
    Goto LightDone
    SPFC A 7 Bright A_Light1
    Goto LightDone
  Spawn:
    SPFC A -1
    Stop
  }
}
User avatar
TDRR
Posts: 829
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: Custom Weapons cannot be scrolled too on number keys

Post by TDRR »

Slap this property in:
Weapon.SlotNumber 5
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Custom Weapons cannot be scrolled too on number keys

Post by Hidden Hands »

TDRR wrote:Slap this property in:
Weapon.SlotNumber 5
Excellent, worked great. Thanks man.
Post Reply

Return to “Scripting”