Doomsday Posted August 3, 2020 I'm wondering how to make pressing the Q button make the player kick. Like in Duke Nukem. Also while holding weapons? 1 Share this post Link to post
0 JadingTsunami Posted August 3, 2020 It's not as straightforward as it sounds, but it can be done. The basic steps I think would be: Include the kick sprites that you want Create a script that adds a "kicking" item to the player's inventory when a button is pressed (in this case, Q) Either: Replace all the standard weapons with versions that check the player's inventory for the special "kicking" item and jump to a special kick state that plays the correct frames (weapon lowers, kicking, weapon raises) -- OR -- Make all the standard weapons inherit from a common ancestor that has the kicking code in it. Within the kick attack, remove the "kicking" item from the player's inventory and return back to the weapon raise animation (or wherever you want it to go). You will need to include calls to JumpIfInventory for your kicking item in every place you want a valid kick animation to play. This will sprinkle them throughout the weapon states if you intend to have kicks work while reloading or in between firing, etc. 2 Share this post Link to post
I'm wondering how to make pressing the Q button make the player kick. Like in Duke Nukem. Also while holding weapons?
Share this post
Link to post