Jump to content
Sign in to follow this  
bmgarcangel

Bayonet animation on a rifle

Recommended Posts

sweet, i'm starting to think any thing (almost) is possible in OFP

Uuh, no. wow_o.gif

Anyway, that looks like a fine bayonet system, but nevermind that, nice soldiers. smile_o.gif

Share this post


Link to post
Share on other sites

fudge it, already been posted... sorry people... sad_o.gif

Share this post


Link to post
Share on other sites
Wow! Awesome! I hope that after the release of these troops/landrovers/bayonets that perhaps you'll also help othe rmod teams use that bayonet system. It would be really nice for example to see the BAS troops with bayonets (or Earl & Suchey's Marines) along with some Russian infantry with bayonets. smile_o.gif

At any rate that video was just amazing. Do the AI use the bayonets or is it mainly for players? Either way I think it looks incredible. The only criticism I might have from the video is that it looks like they're kinda stabbing a bit low (like at the victims legs) so perhaps if possible they should stab a bit higher? That's just a minor quibble...I'm happy that they're stabbin' at all. smile_o.gif

Chris G.

aka-Miles Teg<GD>

The AI use the system too (if you look closely in the action menu you can see a couple new options).

The animation was made "low" because:

a) So it wouldn't look totally stupid if the enemy was crouching/prone

b) We Brits have an obsession for that portion of the body tounge_o.gifrock.gifcrazy_o.gif

Share this post


Link to post
Share on other sites

Hi, I'm Tom, UKF's scripter.  I wrote the script bayonet script (and associated 'fix bayonet' script).  I just rewrote it last night in fact, and got rid of loads of bugs.  Stu (Gameer) made the animation, while Dave (Vade101) and Jonno made the bayonet model and inventory object.  Jonno, the mod leader, seems quite happy to share it all with everyone else.  So once I've made the modifications I've planned, I'll talk to him about passing the script to other mod teams.  Or at least telling their scripters how they might go about making their own.

Anyway, some details about the script are as follows:

* The script does not run if the unit is not using a weapon fitted with a bayonet.

* The player will automatically bayonet any enemy soldier within a distance of 1.7 in his forward field of vision.

* For AI soldiers, the script searches for any enemy soldiers within a range of 15 (about 11.5 metres) in the unit's 90 degree forward field of vision.

* Upon finding a live enemy soldier, the unit will get up off his belt buckle, sprint to the enemy and stab him.

* AI soldiers will automatically follow their intended victims, so it is of little use running.

* Once the enemy soldier is dead, our man returns to normal.

I'm currently working out any kinks and writing new features.  But that is the script as it stands.

Share this post


Link to post
Share on other sites

just to add to that... if the script does go public, it will only be after the release of our DPM Pack smile_o.gif

Share this post


Link to post
Share on other sites

Well....I was actually curious also if we could work together...rest in mind, if we used, we wouldn't release it until you guys released it...that would just be uncool crazy_o.gif

Share this post


Link to post
Share on other sites

What happens if you are crawling with bayonet fixed and get close to an enemy?

Or if you are in the crounch posistion, then run up to the enemy. Do you drop down on one knee, then the animation happen?

What if an enemy walks into your path while you're are crouching?

Share this post


Link to post
Share on other sites

bmgarcangel - speak to Jonno at:

jonno@project-ukf.com

Hinny...

The animation is the same in all cases - the man will get up from the prone position, crouch position and then use the bayonet script - this is the case for AI and player AFAIK.

if the bayonet is attached and an enemy walks in front of you, i expect (i havnt tested that yet) the script will kick in and you'll stab him

Share this post


Link to post
Share on other sites

Will there be a way to stop them doing it? It'll be damn annoying if you've spent ages sorting out an ambush to have the crazy AI run out to stab someone crazy_o.giftounge_o.gif

Share this post


Link to post
Share on other sites

I'd imagine the conveniatley put 'Remove Bayonets' command would come in helpful there.

Share this post


Link to post
Share on other sites

Well I couldnt be assed to download the video so I wouldnt know that would I rock.gif

Share this post


Link to post
Share on other sites

Roger dude. I will email him when I get home from school in about 3 or 4 hours smile_o.gif

Share this post


Link to post
Share on other sites
Well I couldnt be assed to download the video so I wouldnt know that would I rock.gif

then that would be your first mistake....

im not entirely sure about the scripting, but i'll ask Tom - maybe we can add some conditions to allow the player to hold the men back... but we'll see

Share this post


Link to post
Share on other sites

Wow....all this sounds really fantastic.  Hey Tom, one of the first mods that comes to mind that could REALLY use this bayonet system is the Civil War mod and what's left of the Nepolean War mod.   Something like a Civil War mod is HEAVILY dependent on bayonets.   I can just imagine seeing two 1800's era armies charging each other with bayonets fixed.  smile_o.gif

But for now I'll be more then happy seeing the bayonets on these fantastic looking British troops.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites
I'd imagine the conveniatley put 'Remove Bayonets' command would come in helpful there.

hehe smile_o.gif

Share this post


Link to post
Share on other sites

Ref. crouch/prone to bayonet. That remains the only major problem. I've searched and searched, tried all sorts of clever tricks, but I just can't find a way to find out a unit's stance. At the moment, should an enemy soldier come close to a prone UKF soldier with a bayonet fitted, the script will fire and after about 1.01 seconds, the enemy soldier will drop dead, irrespective of the UKF soldier's position. Even if that means he's still getting up off his belt buckle. He'll still peform the attack, even if the target has already dropped down dead. If anyone can think of a way to solve this then by all means give me a shout.

Share this post


Link to post
Share on other sites

The best way to use the bayonet is in a last resort. Not to think fix bayonets and lay in an ambush position but to use on ‘soft’ targets to conserve ammunition, etc.

They also come in very handy when Fighting In Built Up Areas as you can imagine.

Share this post


Link to post
Share on other sites

what about a prone stab and a crouched stab anim so u have 3 different ones. then they wont have to get up biggrin_o.gif

Share this post


Link to post
Share on other sites

That's all very well (a lot of work for Stu, our animator), but I'd still need some way of determining whether the unit was standing, crouched or prone in order to play the appropriate animation. Which gets us no further at all. If you've any more suggestions though, keep em coming.

Share this post


Link to post
Share on other sites

and make em quick! we're trying to get this released asap now smile_o.gif

Share this post


Link to post
Share on other sites
That's all very well (a lot of work for Stu, our animator), but I'd still need some way of determining whether the unit was standing, crouched or prone in order to play the appropriate animation.  Which gets us no further at all.  If you've any more suggestions though, keep em coming.

Your best bet is probably popping off an email to one of the BIS crew to see if they'll tell you what the crouch and prone positions are called or how to identify them in a script so you can fix that problem.  

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

That's a good idea, I'll try that. Now I just need to find some reliable contact details. Thanks.

Share this post


Link to post
Share on other sites

hmm.. try IM Maruk or someone Tom wink_o.gif

And I'd like to take the credit from Jonno on the model of the bayonet smile_o.gif (unless he made a new one, which I doubt wink_o.gif

Wouldn't be any use for a weapons modeler if he wouldn't be put up to his task smile_o.gif

anyway.. cheers for all the comments, our boys deserv what they get.. outstanding work Gameer, Tom, Dave smile_o.gif

Cheers

Joe

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×