Picking up weapons by "use" instead of running over?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Skwirl
Posts: 214
Joined: Sun Feb 01, 2015 11:38 pm
Location: 'merica
Contact:

Picking up weapons by "use" instead of running over?

Post by Skwirl »

I want to make it so in my mod, the player is not carrying so many different weapons at once. Just a sidearm and a bigger gun, whether a shotgun or a rocket launcher. I'm trying to add a little bit of realism and challenge this way.

Doing that, how would I disable a gun sprite from being an actor that can be run over and picked up, and instead make it so if the user is near the weapon, a small text prompt shows the name of the gun, and depending on its type, the gun would replace what the player already has by hitting the Use key?

I imagine this will need ACS, which I still need to practice, but I want to know how the actual mechanical work of this technique would go, or if it can't work at all to begin with.

First thing that comes to mind is an ACS library where it's used on every level, and having something to do with weapon slots, since I obviously want to keep things like Unarmed and Melee while only two other slots are specified depending on the type of weapon.
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

Re: Picking up weapons by "use" instead of running over?

Post by comet1337 »

whipped something up, works fine ingame
only bug is that they don't give ammo unless you already have the weapon + you can only get ammo from the weapon you have

try out map05 or summon yourself the shotgun, SSG and chaingun (and maybe some ammo)
pickupsys.pk3
altfire drops your gun so you can pickup another
(1.34 KiB) Downloaded 38 times
autopsy and reverse engineer the pk3 as you like
Locked

Return to “Editing (Archive)”