How To Create a Duel-Weild System?

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.

How To Create a Duel-Weild System?

Postby BL1TZKRI3G » Sun Nov 17, 2019 12:38 pm

Okay so, I'm creating a mod (Obviously lmao) and in the mod, I have an Uzi, and Duel Uzi (Duzi). I've coded the weapons in full, implemented a reload system, etc. But I want to create a system akin to Hacx where to get a Duzi you need to get two Uzi pickups.

I've looked throughout the Hacx Decorate to see if there's some kind of thing that makes it work. No bueno. I've theorized about creating an actor dummy (Like the one I've used for the reload system I made) to give the player the dummy once he picks up an Uzi, and then after he picks up another one I use A_JumpIfInventory to give the Duzi. But that doesn't work, as far as I can see. I'll keep experimenting with methods, but can anyone tip me off to a way on how I can get this to work?
User avatar
BL1TZKRI3G
 
Joined: 10 Feb 2018
Location: Somewhere in the west. The northwest. The north, northwest. Very cold/10
Discord: b& lmao
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: How To Create a Duel-Weild System?

Postby Jarewill » Sun Nov 17, 2019 1:42 pm

Okay, from what I understand you are trying to replace the uzi with the dual uzi when the player picks up two weapons, correct?
In this case you need a custominventory to manage the weapons, example below:
Spoiler:

This should work if the dual uzi is a different weapon.
Jarewill
 
Joined: 21 Jul 2019


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest