Doomsday Posted October 12, 2019 How do I make a weapon reload like in Duke Nukem 3D were after shooting a certain amount of bullets it would play an animation of you reloading your gun? 0 Share this post Link to post
0 Dude27th (2) Posted October 24, 2019 You should use an inventory item wich counts as "fake clip" bullets. Let's say your "clip" has 15 bullets, so you could add to the player one of these fake bullets every time you shoot one. So if you had enough fake bullets already you could check with "A_JumpIfInventory" to check if your fake clip was completely depleted, and the "A_JumpIfInventory" allows you to jump to another weapon state if it checks as true. For example: Fire: TNT1 A 0 A_JumpIfInventory("FakeBullet",15,"FakeReload") // Before firing it checks if you fired enough bullets to deplete a "clip", if true jumps to FakeReload, if not continues below TNT1 A 0 A_GiveInventory("FakeBullet",1) //This add a fake bullet to the player to work as a counter everytime you shoot FIRE A 5 FIRE A 1 A_Refire Goto Ready FakeReload: RELO ABCDE 5 //Your reload animation TNT1 A 0 A_TakeInventory("FakeBullets",15) // This take your fake bullets to reset the counter Goto Ready 1 Share this post Link to post
0 Dude27th (2) Posted October 24, 2019 Of course you need to create the actor first which would act as the counter, something like this should do: Actor FakeBullets : Inventory { Inventory.MaxAmount 15 } 1 Share this post Link to post
How do I make a weapon reload like in Duke Nukem 3D were after shooting a certain amount of bullets it would play an animation of you reloading your gun?
Share this post
Link to post