Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

How to add the MIGHTY BOOT.


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

1 answer to this question

Recommended Posts

  • 0

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.


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now