Weapon/Item dropped state
Posted: Sat Mar 16, 2013 2:03 am
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?
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?