Home   Help Search Login Register  

Author Topic: standing and crouching stability mod  (Read 1789 times)

0 Members and 1 Guest are viewing this topic.

Offline calvinb1nav

  • Members
  • *
  • I'm a llama!
standing and crouching stability mod
« on: 21 Dec 2007, 09:04:27 »
Does anyone know if it's possible to make a mod such that when you are standing or crouching behind a fence, window, sandbag, etc. it would simulate bracing on the fence, etc. so you should more accurately?  When you in a fortress or behind a wall, you are penalized for standing but you can't shoot from the prone position over a fence, wall, etc.  Maybe the mod could detect that you were next to an object and simulate bracing so that you would get prone-like stability for shooting.  Thoughts?  Or maybe it could be a separate command in the command menu for "bracing"...

PBAR

Offline Mikero

  • Former Staff
  • ****
  • ook?
    • Linux Step by Step
Re: standing and crouching stability mod
« Reply #1 on: 08 Jan 2008, 12:27:58 »
you could, create a cfgactions or cfgmanactions for you model that included a bracing position. presumably you'd use the standing up model but give it the lying down characterstics (less movement eg). I am not aware of tokenverb in a config.cpp class that can give anything more stability (which is really what you want).
Just say no to bugz

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: standing and crouching stability mod
« Reply #2 on: 08 Jan 2008, 16:21:40 »
Brainstorming ideas (probably dumb, but worth chewing on):
- Couldn't you replace the weapon, whenever you entered or left this braced position, with one that looked the same, but with less or greater deviation, respectively? This would have the side-effect of reloading the weapon each time you changed position, so you'd need to make sure that bracing animation wasn't faster than reloading.
- Make the weapon very stable by default, but whenever it is fired from an un-braced position, manually nudge the bullet by a small deviation in velocity away from weaponDirection if you aren't in the braced position. Alternatively, you could do this the other way around, so that the weapon was configured normally, but that projectile velocity was "nudged" towards weaponDirection if the player was braced.
- Have different firing modes or muzzles on the weapon for braced/un-braced deviations. The problem here is more that I can't see how you would stop the player changing modes/muzzles regardless of position.
- Theoretically, you should be able to detect when the player is behind an object such as a wall or window by using nearestObjects (for editor objects) and nearestBuilding (for static map objects) and comparing the player's position and stance (using Mando GetPos) with the boundingBox of the object, but the problem is still how do you give the player the extra stability when they are firing from such a position. The maths also gets a bit messy and it is likely that you'd get odd results if the object wasn't a simple cuboid (since then it wouldn't fill its boundingBox).
« Last Edit: 08 Jan 2008, 16:23:26 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: standing and crouching stability mod
« Reply #3 on: 13 Feb 2008, 08:45:02 »
Although it is annoying that bracing of this sort would be difficult if not impossible to implement, I was wondering if one might get somewhere with deployment of heavy MGs like the M240. Unlike regular guns, including the M249 SAW, the portable MGs are almost unusable from a standing or even crouching position. This makes them almost useless unless you are prone on open ground (no grass or obstacles to obscure your view).

I was wondering if it would be possible to have a "deploy tripod" command which created a vehicle in which you could sit and fire the very much more stable gun (which would allow you to see over grass and small obstacles). You'd obviously be able to undeploy the weapon again, which would put it back in your inventory. By using the vehicle approach, you don't have any issues about standing up with a deployed weapon that used the replacement weapon method described above.

You could also allow an assistant machine-gunner/loader position in this "vehicle" (which would automatically move MG ammo from the loader's inventory into the vehicle's inventory when a reload was required). The major reason for a loader, though, would be to eliminate reloading times by hooking together ammo (implemented by, when the magazine is empty, removing the weapon from the vehicle and replacing it, which should instantly reload it). Having a separate position might be difficult, since if you weren't using a loader you'd still need the free "space" at the left of the weapon in which to to put one. If you implemented this re-loading feature, then it would be worthwhile having a "deploy bipod" action, so that you could use the loader in the prone position too (might still be worthwhile, since you could make the non-bipod MG still pretty unwieldy in non-deployed use).

Anyway, I know nothing about making models or configuring them, since I'm more of a scripting fellow, but I thought it was worth discussing if this method was possible.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)