Jump to content
Sign in to follow this  
CJLivs

Bolt action scripting

Recommended Posts

Can anyone help?

I'm trying to script a soldier to go into the "ManActReloadMagazine" cycle after firing a shot from a certain weapon. Hopefully giving me a poor-man's bolt action look.

Anybody any ideas or know where I can find an easy to implement bolt action script as I'm not a great scripter.

Note: This will only be for my own use and not be re-distributed.

Thanks

Share this post


Link to post
Share on other sites

Hello smile_o.gif

Add a civilian ingame.

On the initialization:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

this addmagazine "HuntingRifleMag";this addmagazine "HuntingRifleMag";this addweapon "HuntingRifle";this addEventHandler ["FIRED",{_this exec "boltaction.sqs"}]

On ur mission folder add that script called boltaction.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

; boltaction.sqs

; this addEventHandler ["FIRED",{_this exec "boltaction.sqs"}]

; http://community.bistudio.com/wiki/Operation_Flashpoint:_Moves_List

; OR make ur own ! :-)

; http://ofp.gamepark.cz/_hosted/animcenter/

_myrifleman =_this select 0

~0.05

?(_weapon == "HuntingRifle"):goto "boltaction"

#boltaction

_myrifleman switchMove "CombatReloadMagazine"

exit

At thumbs-up.gif

Share this post


Link to post
Share on other sites

aha, and enjoy bugs when crouched or prone wink_o.gif

In ofp it's only possible for a mod (like leberation one), not addon

Share this post


Link to post
Share on other sites
Quote[/b] ]Hopefully giving me a poor-man's bolt action look.

btw..

# CrouchReloadMagazine # LyingReloadMagazine

merkulov.jpg

tounge2.gifwink_o.gif

Share this post


Link to post
Share on other sites

Nice one guys,

I see what you mean about the buggy appearance, the soldier suddenly jumping up if reloading whilst prone or crouched. With the problems detecting whether the soldier is prone, crouched etc I can't see a way around this.  huh.gif

Thanks all the same!

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  

×