I'm working on a weapon mod in Slade3 to make the weapons somewhat more realistic. I've seemed to get the hang of reloading weapons and zooming down the sights.
One thing I wanted to attempt is to have a pistol, have a knife, and make it so that if you have both, you would hold the knife in one hand and the pistol in the other, allowing to make two types of attacks without switching. So, obviously, I'd need to make a new weapon for this. I'm pretty sure I can set the pickup of both the knife and pistol to check for the presence of the other, and then to a give/take inventory call to swap the pistol for the combo weapon.
Where I get stuck is figuring out what to do if the player drops the knife (assuming it can be selected on its own as well). When that happens, I'd want to take the combo weapon from the player and give the pistol back. Sadly, the only way I can think to do this would be to access a state when the knife is dropped, but I don't seem to see any predefined state to do that.
Is there any way for me to execute (either in the DECORATE lump or a script) to catch when an item is being dropped?
Weapon/Item dropped state
-
- Forum Regular
- Posts: 294
- Joined: Sat Jun 16, 2012 7:42 pm
RE: Weapon/Item dropped state
In the very first raise state of your dual pistol/knife, call an ACS script or inventory check that matches both weapons. If either one is missing, jump states to deselect or use ACS to remove dual weapons and leave one remaining. So. tecccccccccchnically, you'd still have the dual weapon, but only until you scroll to or select it.
Last edited by BloodyAcid on Sat Mar 16, 2013 2:12 am, edited 1 time in total.
-
- Posts: 37
- Joined: Wed Mar 13, 2013 12:53 am
RE: Weapon/Item dropped state
Hmmm, that might work. So the idea is it would happen before the A_Raise in Select, so you wouldn't see any animation?
I've looked into ASC scripting a bit (it looks strongly C-based, which I do a lot of work in), but I've yet to attempt to call it from the DECORATE lump. I'll see what I can do. Thanks for the tip!
I've looked into ASC scripting a bit (it looks strongly C-based, which I do a lot of work in), but I've yet to attempt to call it from the DECORATE lump. I'll see what I can do. Thanks for the tip!