Jump to content
Sign in to follow this  
.kju

Scripted weapon collision addon - looking for input

Recommended Posts

I noticed the following script error whilst trying this in Takistan (using the new ACR SF guy in case it matters)...

Error in expression <7) : {"nKneelRfllowerFR"};};};player switchMove _anim;>
 Error position: <switchMove _anim;>
 Error switchmove: Type Bool, expected String

I can't reproduce the error - so maybe it was just a one-off.

That's been a fairly common error throughout the development of the addon so no need to reproduce I know exactly what can cause it, thought I'd completely eliminated the bugger but it seems maybe not. I've identified a couple of other situations that can cause anim looping so I'll fix those over the next few days, but konyo has been very patiently waiting for me to do some work on his MH47 so I better throw that some attention first.

Share this post


Link to post
Share on other sites

The error is when in lowerWep.sqf for all (or the last checked) switch statements no case is true. You need define a default like:

default	{""};

and at the end

if (_anim != "") then
{
player switchMove _anim;
};

Edit:

Unfortunately I am unable to play arma for real these days, so I can only offer feedback from limited testing.

1) Stuck in anim:

Stand at the pipe, crouch, stand up again => stuck completely (I use toggle stance instead of the default key actions)

2) Loop at this metal wall:

Stand close, crouch => stuck in the loop until you move/look away

3) It seems you reduced the checking distance. It no longer works as good(?) as before:

4) Aside from the remaining few issues, I find the sudden and extreme camera shake very unpleasant:

3rd view:

1st view:

(the initial bump at the start)

Unsure if that can be improved (easily) though.

Maybe do a more public release via armaholic etc to get more people's attention. :)

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites
Unfortunately I am unable to play arma for real these days, so I can only offer feedback from limited testing.

Thanks PvP, I really appreciate the time you've put in and trouble you've gone to to post example vids etc. I'll get an update posted over the next few days then I'll ask Foxhound if he can post it at ArmAholic.

Thanks again,

norrin :)

Share this post


Link to post
Share on other sites

Version 0.6 is available form here: http://www.norrin.org/norrin/ArmA2/addons/rflOcclusion/v06/norrn_rflocc.pbo

As I say in the Youtube notes FRAPs was halving my FPS during filming and adding to the screen jitter that occurs when raising and lowering your rifle - without FRAPS running the up/down motion is a hell of a lot smoother now.

Fixes:

* Reduced jitter when lowering/raising rifle

* Fixed not lowering and raising rifle while turning in front of a wall

* Fixed the toggle stance bug described by Kju and a number of other problems such as rearming or getting gear from crates.

* Hopefully removed the remaining up/down loop bugs

* Fixed bug described by Jedra realting to error message while in game.

* More config fixes

Don't forget you need CBA for this addon to work.

Share this post


Link to post
Share on other sites

As always nice job norrin :bounce3:

My only remaining complaint is the jitter. If you can get this removed,

it's perfect (for what can be done with scripting) I think.

Especially when the weapon is brought back up, its still very noticeable:

http://www.youtube.com/watch?v=SGNX4Sox6t0

Whats the reason to have this effect in the first place? SwitchMove?

The quick change? Non gesture for weapon up/down?

Also in third person view its more noticeable, especially at weapon down.

While I wasnt able to reproduce, I got into a loop while climing these flat angle ladders:

http://www.youtube.com/watch?v=snelHhYCL6E

http://www.youtube.com/watch?v=qnHMn5tstP8

Trying to climb this ladder, got me stuck for a moment:

http://www.youtube.com/watch?v=YZCppgJoXeg

It seems the cycle time for the check is less frequent now:

http://www.youtube.com/watch?v=GaAz6_p-jA0

However I assume you did it to avoid other problems.

So to me this delay is not much of a problem it seems.

Only quick DM/CQB play could really tell though.

Share this post


Link to post
Share on other sites

Here's version 0.7 if you're interested: http://www.norrin.org/norrin/ArmA2/addons/rflOcclusion/v07/norrn_rflocc.pbo

Let me know if you come across any problems and don't forget you need CBA when using this addon.

Fixed:

*no more camera shake/jitter when lowering and raising your rifle.

@PvP - the config has matured to the point where I can now use playActionNow rather than switchMove and the camera twitch is gone. The only problem I can see is that the player every now and then takes an extra step during the transition.

Share this post


Link to post
Share on other sites

Wow 0.7 is awesome :yay::yay::yay:

Huge achievement with this addon norrin - kudos!

IMO you should release it in public now to make the large crowd give it a go. :bounce3:

PS: Found one more thing to look into:

http://www.youtube.com/watch?v=JeHbTBmsbus

When you strafe sideways in crouch in normal speed,

you get this one step "shortly stuck due animation transition/change".

When you strafe sideways during walk, it doesn't happen.

Share this post


Link to post
Share on other sites

Available here: http://www.norrin.org/norrin/ArmA2/addons/rflOcclusion/v08/norrn_rflocc.pbo (Version 0.8)

Description:

A small CQB addon that simulates rifle collision behaviour and auto lowers a player's rifle when he is up against and facing a wall. Once the player's view is no longer obstructed the player auto raises his weapon to his shoulder. This makes navigating tight enclosed spaces much easier and is ideal for room/building clearing operations. The addon contains custom animations and collision geometry and requires the CBA addon.

Fixes in version 0.8:

* The player no longer stops to raise his rifle when he is facing a wall with his weapon lowered and starts jogging left or right while kneeling.

Requirements:

CBA

Thanks:

@PvP - Thanks for the original idea and all your help and suggestions mate :)

Share this post


Link to post
Share on other sites

Thanks a lot Norrin. And Pvp.

I haven't tested this since a version when it didn't use custom animations. Never could test it in MP environment either.

Any idea regarding what would happen if someone used this on a MP server while some others don't? I guess it would create some issues due to different collision geometries on different clients?

Share this post


Link to post
Share on other sites

Great job but a soldier takes two steps in the direction of movement when lowering/raising weapon. F.e. when I move away from the wall to raise the weapon by just a bit - the soldier makes 2 additional steps backwards.

Share this post


Link to post
Share on other sites
An alternative to st_movement

Yeah, a good one even, but st_movement doesn't include any custom anims, so having people running it and others not running it on the same server is not much of a problem.

Share this post


Link to post
Share on other sites

Neat concept. I'll stick with st_movement for now due to the glitchy animation behavior that happens from the .8 version of this, but I would be very interested in seeing something like this applied to A3 and any changes that have happened to the animation system in it. Nicely done from a technical standpoint.

Share this post


Link to post
Share on other sites

See this mod for the first time. Finally some weapon collision!

A3 should have real weapon -> world collision from the start. That way implementing resting weapons on surfaces to steady aim would be a breeze.

Sad thing is, Infiltration (mod for ut99) had all this and is over 10 years old. Devs should wake up.

Share this post


Link to post
Share on other sites

Tried this mod out last night: and LOVED it!

About time too!

The only issue I seem to be having is that there's a wobble to the aiming, some of the time. I'm not sure if it's stance related or not, because I was too ecstatic to see it working over and over again. Moving around interiors is SO much easier now. THANK YOU! Just so you know, I tried this mod out paired with the latest release of I44, and I was very relieved to see that it didn't interfere with any of its customized animations. I've yet to try it out with my beloved COWarMod, but hopefully I soon will - its animations are important to me as well.

zeep! Good to see you again man! Your link to Infiltration is leading to a bad page. And he's correct: Infiltration had all of this and SO much more, and many moons ago too. Man, I still love Infiltration!

Still, I'll take ANY improvement to ArmA II that I can get, and you can bet that I'll be tracking this masterpiece-in-the-making from here on out. This is a "game-changer" type mod in my opinion. Keep up the great work and thanks again for all of your efforts.

Share this post


Link to post
Share on other sites

Likewise, nice to see a friendly face from the past Kyle!

Good times.. I still have Inf installed.

*Thanks, link fixed.

Great that this mod also works with I44.

Share this post


Link to post
Share on other sites

Thank you Norrin.

You left the debug hints on ;)

raiseWep.sqf line 45

Edited by [KH]Jman

Share this post


Link to post
Share on other sites

Very nice addon! But Shame its an addon and nothing official because its about time to have something like this!

Anyway, does it take in consideration the length of the weapon (or its "3D box") or is "just" the distance between the unit and the obstacle?

And while the lower weapon works almost flawless, the raise isn't. I could almost touch the muzzle when going against the wall, but when I backed the clearence needed was much bigger.

But good work nevertheless, will keep an eye on this.

Share this post


Link to post
Share on other sites

Oops, thanks for the heads-up Jman - nice to see your smiling avatar again :)

Here: http://www.norrin.org/norrin/ArmA2/addons/rflOcclusion/v091/norrn_rflocc.pbo (version 0.91)

Fixes 0.91:

*Removed the annoying debug hint that appeared when raising your rifle

Anyway, does it take in consideration the length of the weapon (or its "3D box") or is "just" the distance between the unit and the obstacle?

And while the lower weapon works almost flawless, the raise isn't. I could almost touch the muzzle when going against the wall, but when I backed the clearence needed was much bigger.

At the moment its working on "just" the distance between the player's body and the obstacle. The distance when moving away is slightly larger than moving towards so as to reduce the risk of looping of the up/down animation. The plan is, as long as there are no major bugs identified, that I'll tweak the distances and make them dependent on the size of the default OA weapons.

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  

×