I know kungfu. Show me.

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

DeeperShade

Banned
Dec 8, 2000
9,621
0
0
43
www.tar-valon.com
Ok, basically i just wanna get some jackiechan, ass kicking going (who doesnt? :)).

How would i go about binding player movements to weapons? Say if you select weaponset 3 then you get a sweeper and weaponset 4 could be round house?

Does that make sense?
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
Okay, first I've got to warn you that if you want to make a good kung-fu modification you are going to new a new player model with custom animations. Not sure if that crossed your mind or not, but usually new players models are hard as hell to come by.

Now, you could just do it all in first person and get away with first person weapon models (hands, fists, jo staff anyone?), and then just not worry about the players playing an animation in third person. That way instead of a flying dragon kick you would see the person jump at you, and instead of a kick the would stand still. Exciting, huh? :)

Basically for the kicks/punches, it sounds like what will work best for you is to make an individual weapon for each move. For example:

class KarateChop extends TournamentWeapon;

function Fire(float Value)
{
local Pawn p;

foreach RadiusActors(class'Pawn', p, 50)
{
// check to see if it's in front of the player
// and then process the hit (do damage, play sounds, etc)
}
}

And then to set a weapon to a particular key is to set the InventoryGroup in the defaultproperties if I remember correctly.

defaultproperties
{
InventoryGroup=1 // key 1 will bring up the karate chop
}

Hope this is enough to get you started...
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
43
void
www.vovoid.com
Didn't you make a shaolin monk?
Wouldnt that be great for a kung-fu mod?
I think the idea with the weapons is great, like you can choose a particular "class" of fighting, like 1=simple punches, 2=simple kicks, 3=more advanced kick... e.t.c.
The code also allows for combinations, say you have a weapon that have a Choku Zuki (straight punch) as first fire and the player wish to do one of these, the weapon goes into it's first fire state.
There you have access to the fira and altfire functions, so if he makes a double-tap or a fire-altfire tap, you can put in new combinations and strikes there.
The player pushes fire: Straight punch
Doubleclick: he continues into Oi Zuki, stepping punch
fire-altfire: straightpunch, followed by a Mawashi Geri, roundkick

You can even go deeper, if you goto a new state when firing from the states, very complicated, like:
The player taps:
fire, fire, altfire
The character punches, takes a tep forward and punches again with the other hand (stepping punch) and then advances to a Mae Geri (straight front kick).

As you see, this can make the combinations very complex, like games like streetfighter.
Alltough you might wanna keep it at the second tap, which makes six combinations per "weapon".
And it might be hard to figure out all the movements.
Maybe you just have a taptime to let the player show what movement he wants.
You wait a 10th of a second for a doubletap and if there isn't one, you go for the primary movement, but if there is one you go for the other movement.

(This is getting complicated;))

Example:
If player hits fire: Straight punch
fire-fire: stepping punch
fire-altfire: reverse punch (Gyaku Zuki)
altfire: Front kick
altfire-fire: Roundkick
altfire-altfire: Spinning back kick (Ushiro Geri)

And all this in one "weapon"

(Phew!)
(The moves I described is taken from Karate)