Quick Kick in Doom. Is this possible?

Do you have a question about making weapon mods, or do you just need some tutorials and resources? Ask about all of that here.

Moderator: wildweasel

Locked
User avatar
DuduKrazy
Nyuuu...
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Quick Kick in Doom. Is this possible?

Post by DuduKrazy » Fri Aug 24, 2007 1:23

In Duke Nukem 3D, you could use the mighty kick regardless of which weapon you're using by pressing a button. now i want to recreate this in Doom but i don't know if this is possible. if it's really possible, is there a way to do this?

User avatar
wildweasel
Member, DRD Team
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel » Fri Aug 24, 2007 1:55

Well, from a practicality standpoint you're going to have to create an awful lot of graphics - versions of your weapon with the mighty foot inserted into them. To actually get it to work, you're probably going to need to use the AltFire states in Decorate - unfortunately, this pretty much won't work if your weapon already has an altfire, or if you planned on having altfires for your weapons that did not involve the mighty foot.

Alternatively, though, you could set up a key to switch firing modes for the weapon to make up for the loss of the AltFire state.

User avatar
DoomRater
I wanna get stuck in with da code
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post by DoomRater » Tue Oct 02, 2007 16:59

Quick steps to making a quick melee change:

1. code your melee weapon with a trigger (an inventory item that acts as a flag, two inventory items to control whether it's on or off, and a keybinding that uses the on state on press and uses the off state when let go, see "Adding Reloading to Weapons" for how to do that) that if set will raise the weapon very quickly and then throw an attack. It should then go to the Deselect state with A_SelectWeapon depending on what weapon was in use at the time.
2. Create a second inventory item for the use of remembering what weapon was selected at the time. Each of your weapons should change this value when selected and should not change it on deselect. Make sure each weapon changes it to a specific number! (the easiest way to do this is to take the maximum amount from the inventory item and then give the appropriate number back)
3. Add code to check for your new trigger in each weapon. It'll look about the same each time- it calls A_SelectWeapon(melee weapon) and the code in the melee weapon takes it from there.

Another way is to code the melee attack into each weapon (and if you don't want to superimpose the graphics, you can use the flash states if you're not already using them to picture the gun while you run through the melee animation using the regular gun frames so that it appear underneath the gun). Which method to use really depends on whether you want that Duke Nukem style or not.

User avatar
Nick_Perrin
Music > MoUAC > Life
Posts: 29
Joined: Thu Jul 28, 2005 2:09

Post by Nick_Perrin » Thu Oct 11, 2007 22:37

You should make the muzzle flashes of all your guns as part of the weapon frames themselves and not separate sprites, so you can use the weapon's flash animation as the quick kick... meaning you don't have to make extra frames at all, you'll have two independent sprites going.

User avatar
DoomRater
I wanna get stuck in with da code
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post by DoomRater » Thu Oct 11, 2007 22:40

For layering purposes, I'd have it the other way around (flash states show the weapon and the regular animations use the kick). That way the weapon appears overtop the leg.

If the other method is used it's more like Duke Nukem, though. The weapon deselects, goes into a quick kick, and then reselects the weapon being used.

User avatar
wildweasel
Member, DRD Team
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel » Fri Oct 12, 2007 1:25

You mean like in the older versions of Duke, right? Because that doesn't happen in the Atomic Edition.

User avatar
DoomRater
I wanna get stuck in with da code
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post by DoomRater » Fri Oct 12, 2007 2:07

What happens in Atomic Edition? Does the weapon simply not deselect and just throw a kick?

User avatar
wildweasel
Member, DRD Team
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel » Fri Oct 12, 2007 4:54

The weapon remains onscreen and can even still fire - the mighty foot graphic simply appears beneath the weapon and engages the attack like usual.

User avatar
TheDarkArchon
Damn right I'm mighty.
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon » Fri Oct 12, 2007 10:41

And that happens even with the seperate foot weapon. Double kick FTW.

User avatar
wildweasel
Member, DRD Team
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel » Fri Oct 12, 2007 15:39

It's possible to make Duke dance the can-can by alternating between the real kick and the off-hand kick.

User avatar
NeoWorm
Neumim anglicky
Posts: 29
Joined: Sat Nov 05, 2005 0:13
Location: Czech republic
Contact:

Post by NeoWorm » Sat Oct 13, 2007 15:44

Do you know that Duke have three legs? Try to kick with both legs wneh stomping on a shrinked enemy... (doesnt work in atomic edition)

User avatar
Axel
I'm not immature. I'M NOT! I'M NOT! I'M NOT!
Posts: 6
Joined: Sat Dec 29, 2007 13:20
Location: Britain (Gah)

Post by Axel » Sat Dec 29, 2007 23:48

It could probably be done using HudMessage, juust bind the Quick Kick key to puke a script that triggers the hudmessage foot graphic and spawn an attack actor in front of the player.

User avatar
Gez
Developer
Developer
Posts: 1394
Joined: Mon Oct 22, 2007 16:47

Post by Gez » Sun Dec 30, 2007 2:07

NeoWorm wrote:Do you know that Duke have three legs? Try to kick with both legs wneh stomping on a shrinked enemy... (doesnt work in atomic edition)
Yeah, it's quite funny running around in eDuke32 with your two legs kicking the air and never touching the ground. :lol:

User avatar
Janitor
On the Dark side of the Moon
Persecution Complex
Posts: 123
Joined: Sun Jul 08, 2007 17:16
Location: Not in Kansas anymore

Post by Janitor » Fri Jun 27, 2008 21:41

yes it is!

and I've done it for my Unnamed TC :cheers:

Locked

Return to “Weapon Modding Help & Resources”