Weapon linit

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Weapon linit

Postby YeeTee2 » Mon Feb 08, 2021 12:16 pm

Does anyone know how to make my player only be able to hold 2 weapons from any slot? I'm not experienced at ACS, Decorate or Zscript
Joined: 07 Feb 2021

Re: Weapon linit

Postby Misery » Mon Feb 08, 2021 1:23 pm

The weapon's slot number is in its ZScript, known as Weapon.SlotNumber, or you can define a Player Class, and use Player.WeaponSlot. The link below can describe in more detail, and list a couple more ways to define a weapon slot.

User avatar
Joined: 04 Nov 2018

Re: Weapon linit

Postby StroggVorbis » Fri Feb 19, 2021 5:24 am

I suggest looking at how the mod "The Adept" does it.
It's similar in scope to your question, one Hexen class which can wield any Fighter, Cleric or Mage weapon, but only one per slot.
Try studying it and you might be able to tailor the code to your liking :)

User avatar
Donut eat me pls!
Joined: 08 Nov 2017
Location: Germany
Discord: StroggVorbis#2466
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests