Battlefield-like Knife weapon?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
LRKfm946
Master Sergeant
Master Sergeant
Posts: 163
Joined: Sun Feb 02, 2014 6:13 pm
Projects :: Battlefront II Hunger Games
Games I'm Playing :: SWBF2 BF3
Contact:

Battlefield-like Knife weapon?

Post by LRKfm946 »

I had a pretty cool idea today that I thought was worth sharing and pursuing. It'd be really cool if there could be a knife in swbf2 that functioned like knives in Battlefield 3/4. Here are my ideas so far:

I'd like to at least have the take-down attack when you attack the opponent from behind. This would have to be a separate weapon from the normal knife slash attack. I'm thinking the takedown would have to be based on force choke (to keep the victim in place), with custom animations for both the attacker and the victim similar to the video. The alternative would be to make it an emitter ordinance or force push and specify the custom animation as the death animation (if that's possible). Getting it to only work when attacking the opponent from behind will get really complicated, and might not be possible. That'd require some serious math and LUA work.

Then of course there could be the normal slash attack, which I know has been done before, but I feel like there hasn't been a really refined and authentic looking animation for it (that I've seen).
We could also bring in blocking against both attacks, but that could get complicated with all the bugs with blocking in the game.

I know it's pretty ambitious, and may not even be possible. But I'd totally be down to collaborate with anyone else who's interested and see if we can come up with something.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Battlefield-like Knife weapon?

Post by razac920 »

It should be possible to determine the angle between the way two characters are facing through LUA (I can help you with that), but then you would still have to use LUA scripting to recreate the weapon effects you want (I don't know much about animations)
LRKfm946
Master Sergeant
Master Sergeant
Posts: 163
Joined: Sun Feb 02, 2014 6:13 pm
Projects :: Battlefront II Hunger Games
Games I'm Playing :: SWBF2 BF3
Contact:

Re: Battlefield-like Knife weapon?

Post by LRKfm946 »

Yeah that's what I was thinking: if they're looking in the same direction, give or take 20 or so degrees, then the takedown will work. The only problem is preventing it from executing if they're not. It could be as simple as giving the victim a ridiculous health regen or someting so the attack does no damage, but the attacker would still perform the animation and they would be stuck in place for however long the animation lasts (assuming we use force choke as the template and prevent all movement).

Another question: can .combos only be used with melee weapons?
User avatar
TWINKEYRUNAWAY
Lieutenant General
Lieutenant General
Posts: 730
Joined: Fri Aug 17, 2012 3:13 pm
Projects :: Empire Rising
Games I'm Playing :: SWBF Doom FONV
xbox live or psn: No gamertag set
Location: 411Remnant
Contact:

Re: Battlefield-like Knife weapon?

Post by TWINKEYRUNAWAY »

Looks very interesting. Wish you luck on seeing this project come to fruitation. Maybe the force choke odf could aid in this?
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Battlefield-like Knife weapon?

Post by MileHighGuy »

LRKfm946 wrote: Another question: can .combos only be used with melee weapons?
Yes, but they come from the hp_fire of the weapon which can be anywhere, you can specify the length and width of the edge, and you can attach explosions
LRKfm946
Master Sergeant
Master Sergeant
Posts: 163
Joined: Sun Feb 02, 2014 6:13 pm
Projects :: Battlefront II Hunger Games
Games I'm Playing :: SWBF2 BF3
Contact:

Re: Battlefield-like Knife weapon?

Post by LRKfm946 »

After looking at the choke odf, I think I can just use that and change a couple things and it'll function correctly as far as how the attack itself executes. At that point all it needs is the custom anims.

Then of course there's still the issue of making only work when coming up behind someone. Another idea I had is letting it work all the time, and if the opponent also has a knife, they can block the attack when facing the attacker, buuuut nothing can prevent you from being choked except slow run, which is obviously not an option here... :x thoughts?
Post Reply