Home   Help Search Login Register  

Author Topic: Some questions on recoil....  (Read 788 times)

0 Members and 1 Guest are viewing this topic.

Offline pexmo

  • Members
  • *
  • I'm a llama!
Some questions on recoil....
« on: 07 Jan 2005, 17:57:03 »
Greetings once again mates.

OK here are my new questions for the gurus around here to solve:

1: Can i edit wepons to not recenter after firing? So that you get a recoil similar to Raven Shield. I have come across INQs m24 it has that recoil.
If its possible please describe how.

2: Is there a way to add custom dispersion to weapons, like inq weps etc? if itcan be done i some config please describe gow im all green to that kind of editing.


3: whats the best "make so that ai cant shoot so damn good" script out there that can be set to all types of enemy units not just HD units.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Some questions on recoil....
« Reply #1 on: 07 Jan 2005, 21:56:52 »
1) no clue

2) I believe it is done in the config, so i would say look in the JAM2 HD weapons config

3) the simpler(and less good) way would be to use setdammage with a negative number. it will make them "excited" and their aim will suck. problem there is that they will be able to take a few hits before they die...at least that would be the logical way of thinking, but with OFP, well..... logic hardly applies

Offline Pilot

  • Contributing Member
  • **
Re:Some questions on recoil....
« Reply #2 on: 07 Jan 2005, 22:33:17 »
1) Same as Triggerhappy, no clue

2)In the CfgWeapons part of the config, there is a setting called dispersion ex.
Code: [Select]
dispersion=0.0007; Adjusting this value will adjust the dispersion of a weapon.  The higher the value, the higher the dispersion.

3)Adjusting his skill level in the mission editor might help.  Putting his skill to the lowest value might affect his accuracy, although I could be wrong.
« Last Edit: 07 Jan 2005, 22:35:32 by Student Pilot »

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Some questions on recoil....
« Reply #3 on: 07 Jan 2005, 22:45:29 »
A real greeny question: Exactly what config file should i edit ?

And where do i find it? (if its in a .pbo file, then how do i get to it)
« Last Edit: 07 Jan 2005, 22:45:59 by pexmo »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Some questions on recoil....
« Reply #4 on: 07 Jan 2005, 22:48:47 »
Use Amalfis PBO Decrypter 1.5 ......available in the Editors Depot.

It will unpack the PBO.
Inside the resulting folder you should find the config.cpp for the addon.


Planck
« Last Edit: 07 Jan 2005, 22:51:24 by Planck »
I know a little about a lot, and a lot about a little.

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Some questions on recoil....
« Reply #5 on: 08 Jan 2005, 01:00:40 »
thx alot ill try that.

On the recoil bit: If you guys dont get what i meen and have INQs inq_m24 rifle in your addons try it and u get what i meen. It jumps ut when u shoot and stays there i dont recenter.



Offline Pilot

  • Contributing Member
  • **
Re:Some questions on recoil....
« Reply #6 on: 08 Jan 2005, 02:32:08 »
Where can I get INQ's M24?

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Some questions on recoil....
« Reply #7 on: 08 Jan 2005, 14:29:20 »
its in INQs weapon pack

I have specificly tested the cammo version of his m24 and it has the recoil im looking for

Offline Pilot

  • Contributing Member
  • **
Re:Some questions on recoil....
« Reply #8 on: 08 Jan 2005, 18:05:53 »
Could you please give me a link to the weapon pack, I'm having no luck finding it anywhere :-[
« Last Edit: 08 Jan 2005, 18:06:17 by Student Pilot »

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Some questions on recoil....
« Reply #9 on: 11 Jan 2005, 10:46:09 »
I was wrong the inq_m24 did only have that recoil in zoomed in sniper view.

I have tested some recoil values but i cant figure the recoil parameters out.

I dont seem to find a way that makes the guns recenter slower, some rifles in inq weppack already does that, like the in1_m24 in zoomed out mode.

Anyone have any input on what value is the speed of the recovery to centerd sight?

Offline Pilot

  • Contributing Member
  • **
Re:Some questions on recoil....
« Reply #10 on: 11 Jan 2005, 19:57:09 »
I was looking through the WFW M82A1 config, and found this:
Code: [Select]
class CfgRecoils
{
   WFWBarret[]={0.022000,0,0,0.060000,0.014000,0.020000,0.050000,0.006000,0.060000,0.340000,0,0};
};

These values affect the recoil somehow.  As I don't have experience making guns, I can't tell you what these values mean.  The only suggestion I can give is to play with these values and see what they do.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Some questions on recoil....
« Reply #11 on: 12 Jan 2005, 01:49:38 »
Hey pexmo!

An answer to #3 you could try this script by General Coder:

Code: [Select]
Maybe you can use a temporaly fire dispersion script... They shoot but they don't hit anything.At least that's how I should solve the problem.

Put this in your V80's init :
Code:
This addeventhandler ["fired",{_this exec "fd.sqs"}]


And this in a init.sqs

dispersionoff = false


When you want to stop the dispersion script put
dispersionoff = true
in a waypoint, trigger or script.

Here is fd.sqs by GeneralCoder
Code:
;;fd.sqs

_shooter = _this select 0
_projectile = nearestObject [vehicle(_shooter), _this select 4]

?dispersionoff : _shooter removeEventHandler ["fired",0];exit
?(_shooter == player): exit
?((_this select 2) == "throw"): exit

_vel = velocity _projectile
_speed = speed _projectile

_disp = (_speed * (0.03 - (skill _shooter)/100) )
_dispX2 = _disp*2

_projectile SetVelocity [(_vel select 0) - _disp + Random(_dispX2),(_vel select 1) - _disp + Random(_dispX2),(_vel select 2) - _disp + Random(_dispX2)]



If you want more dispersion change 0.03 in this line
Code:
_disp = (_speed * (0.03 - (skill _shooter)/100) )


...in a higher value


                                                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.