Home   Help Search Login Register  

Author Topic: better machine gunners  (Read 2284 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
better machine gunners
« on: 07 Sep 2005, 19:51:24 »
you all know that ofp's AI machine gunners east or west dont use the machine gun as its intended they just pop a few rounds till you die they dont seem to use full automatic
so i was wondering is there a way i can get them to keep their finger on the trigger whilst firing at people instead of just slowly shooting ?

im not sure if im looking for a supressive fire script if i was i would use keykats
but im not sure if thats what i want i just want AI to fire more with the machine guns
how can i do this ?

bored_onion

  • Guest
Re:better machine gunners
« Reply #1 on: 07 Sep 2005, 21:09:09 »
have you tried raising the skill? they tend to be more relentless then. as usual in flashpoint, though, they wont fire unless they see a target or have been told to in a script, so if boosting the skill doesnt work then you need to churn out more dumb loons running at it (prone to lag) or search for scripting alternatives.

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #2 on: 07 Sep 2005, 21:12:45 »
i havent tried raising the skill but then also makes them fire alot more accurate then they hit you more then dont need to fire as much

i suppose im going to have to go with a scripting way around it
any ideas on what i can do about it ?

im thinking a long the lines of a fired event handler
check if the unit has a machine gun and use a small loop with a fire command in to keep them firing for about 7 seconds but when i relise in my mission ive got about 10 different event handlers added to every unit in the map wich is a lot aswell ive almost exceeded the limit i would imagine i woudl get one hell load of lag on many computers

any other ideas would be great cheers

bored_onion

  • Guest
Re:better machine gunners
« Reply #3 on: 07 Sep 2005, 21:17:32 »
there's a script in the ed depot called "D-Day style machine guns", which aims to recapture some of the joys of call of duty.

take a look

but it makes them really HD. another solution might be to make the machine guns HD in the mission but on a high skill. however, i think im right in saying that machine gun bullets are too fast to catch in EH's :(
« Last Edit: 07 Sep 2005, 21:20:36 by bored_onion »

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:better machine gunners
« Reply #4 on: 07 Sep 2005, 21:43:49 »
Try using GB's tip of setting their damage to a negative value. It makes them more likely to fire and less likely to hit.  ;)

I set a trigger up: "east present", "aieast= this list".

and run a script with a delay to allow the trigger to run with:
~3
{"_x setSkill 0.9"} foreach aieast
~.5
{_x setdamage -(1 - skill _x)} foreach aieast

or somesuch :)
the footie's on so you may need to double check this due to my alcohol induced lameness.  :)
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #5 on: 07 Sep 2005, 21:48:54 »
ive tried that script before wich for some reason didnt work then i think i did something wrong but ill still check it out again thanks

and using GB's idea is also kind of off since i do have a script wich changes the velocity of the bullets so they will wiz past you and using the setdammage thing wil make them shake and have barely no chance of hitting you wich is kind of what i want the wrong way around ill think about this when im a bit less tired thanks for your suggestions

Offline twisted

  • Members
  • *
  • I'm a llama!
Re:better machine gunners
« Reply #6 on: 08 Sep 2005, 01:08:24 »
i also found this an issue. but being unable to script i searched for a few premade solutioins.

so far the best way i've managed to get mad machine gun action is to use the latest ecp in conjunction with jam3 and then equip the machine gunners with HD.

ecp mod encourages machine gunners to open up and the HD from jam3 keeps them from being too accurate. that said they'll saturate an area with bullets so you gotta keep your head down.

inot the most elegant solution (using two mods) but work well for me.

 8)

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re:better machine gunners
« Reply #7 on: 08 Sep 2005, 11:45:30 »
Machine gun bullets are not too far to catch in EH's.  I do it all the time.  Just all a fired EH and launch a nearestobject call from the fired EH.

I did it if i remember correctly when I was building a script to identify weapon type by checking muzzle velocity ... if ur interested ...

Rifles/sniper rifles - 3240 m/s
Hand grenade - 80 m/s
Smoke grenade - 80 m/s
M203 - 216 m/s
Flare - 288 m/s
LAW - 108 m/s
Machine gun - 3600 m/s
Mortar - 252 m/s
Handguns - 1368 m/s

I just made that script for my own convenience cause i hate hunting for and messing about with classnames.

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #8 on: 08 Sep 2005, 17:11:24 »
hey that ifos bound to come in use thanks
also im looking for an addon free way apart from the editor update so sorry for not stating so

Kyle Sarnik

  • Guest
Re:better machine gunners
« Reply #9 on: 08 Sep 2005, 22:49:14 »
I made a quick little script here that might help (attached file).

Its rather simple really, it forces the AI to fire in full auto bursts and makes them less accurate.

Its easy to use, just run it via an eventhandler:

Code: [Select]
this addeventhandler ["fired",{_this exec "MGfire.sqs"}]
Hope it helps...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:better machine gunners
« Reply #10 on: 09 Sep 2005, 01:37:26 »
Kyle Sarnik!   8)

Welcome home - we've missed you.   :) :) :)
Plenty of reviewed ArmA missions for you to play

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #11 on: 09 Sep 2005, 17:19:42 »
hey thanks alot for the script just looked at it but wouldnt that just make him never stop firing since the fire command will activate the EH then hell fire again then the EH will activate again and so on
or does the fire command not run event handlers ?

cheers anyway

Kyle Sarnik

  • Guest
Re:better machine gunners
« Reply #12 on: 09 Sep 2005, 22:38:06 »
hey thanks alot for the script just looked at it but wouldnt that just make him never stop firing since the fire command will activate the EH then hell fire again then the EH will activate again and so on
or does the fire command not run event handlers ?

cheers anyway

No, I use a rather cool (In my opinion  ;)) technique, using the units skill level as a counter, after every shot it decreases by 0.1 (also BE SURE to set the skill to 1 (full) at the begining of the mission) untill its at 0.5, in which case the units skill is set back to 1 and exiting without forcing him to fire, so that means the AI can willingly stop firing after every 5-6 rounds, and at the same time, become a little less accurate and fire a little less slower after every shot untill he finishes the burst (I guess it simulates recoil).

Quote
Kyle Sarnik!   8)

Welcome home - we've missed you.    :) :) :)  

Hehe, thanks, allthough technicaly I am just visiting  ;) . What I mean is that I now spend more time on the BI and OFP.info forums than here, although I promise I will check this forum at least once a day ::) now that it is sooo much more active than it used to be.  8)
« Last Edit: 09 Sep 2005, 22:41:09 by Kyle Sarnik »

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #13 on: 10 Sep 2005, 09:43:01 »
cheers topic solved also it wont be 5-6 rounds he fies since the fire command makes him fire a burst shot the ot should be about 5x3 so it should be about 15 rounds wich is pretty much perfect for what i need cheers

topic solved

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #14 on: 10 Sep 2005, 11:41:02 »
unsolved ive noticed that the soldiers start firing upwards becuase of the fire command how can i keep them firing at the unit they were firing at ?

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re:better machine gunners
« Reply #15 on: 11 Sep 2005, 15:46:03 »
I dont think anyone ever found a solution to that problem.  I use dowatch/dotarget and the unit still seems to shoot in the air.  Try these commands and c if they work 4 u.

If not I assume you are using the fire command with a multiple string i.e.

Code: [Select]
soldierOne fire ["throw","SmokeShell","SmokeShell"]
If you are I would suggest you try instead using the fire command the other way

Code: [Select]
soldierOne fire "HandGrenade"
For me this doesn't make the unit fire up in the air.  If I can i'll dig up a script  as an example for u, but remember if you want sustained fire to set up a small loop that will repeat so many times before ending.

Hope some of that works for you.  :P

- Paddy

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #16 on: 11 Sep 2005, 20:15:49 »
erm no its the second fire command this is the script wich Kyle Sarnik posted

_gun = _this select 0

_ammo = nearestobject [_gun,_this select 4]

_x = (velocity _ammo select 0)+(random(20)-random(20))
_y = (velocity _ammo select 1)+(random(20)-random(20))
_z = (velocity _ammo select 2)+(random(20)-random(20))

_ammo setvelocity [_x,_y,_z]

? (gunner _gun) == player : exit

? skill (gunner _gun) <= 0.5 : (gunner _gun) setskill 1; exit
(gunner _gun) setskill (skill (gunner _gun) - 0.1)
_gun fire (_this select 2)
exit

its ran through an Event handler
it says _gun fire (_this select 2) where _gun is the soldier who fired it and _this select 2 is the gun thats being fired the fire with a string canot use dotarget and dowatch but with teh second one you can but i cant find out hwat soldier is getting fire at since an Event handler doesnt return the soldier who is getting fired at
unless you know a way of finding out who is getting fired at then im going to have to do a very long way of this like grab the bullet find out where it lands then create a game logic or something that a unit fires at and then get the soldier to fire at it but even then its not firing at the soldier

any ideas would be great

also
Quote
For me this doesn't make the unit fire up in the air.
well thats whats happening for me they fire a burst then shoot up in the air a few times you can use dotarget with this command and they will fire at what there targetting but thats not working here

Kyle Sarnik

  • Guest
Re:better machine gunners
« Reply #17 on: 11 Sep 2005, 23:18:38 »
Try changing where it says (_this select 2) to (_this select 1)...  ::)
« Last Edit: 12 Sep 2005, 20:36:22 by Kyle Sarnik »

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re:better machine gunners
« Reply #18 on: 12 Sep 2005, 15:51:18 »
Ah Kyle, leave us alone.  We may not have achieved your scripting brilliance yet but we're getting there.  My avatar sure does drink alot of coffee ...  :P

Offline 456820

  • Contributing Member
  • **
Re:better machine gunners
« Reply #19 on: 15 Sep 2005, 20:29:50 »
nope just got round to trying it again and doesnt work they seem to fire a lot more wich is good but still directly in the air.
Is there anyway i can find out what position the units targetting like height the units aiming then the Dir ?

Kyle Sarnik

  • Guest
Re:better machine gunners
« Reply #20 on: 15 Sep 2005, 20:52:48 »
Is there anyway i can find out what position the units targetting like height the units aiming then the Dir ?

 :'( No, but I alot of people agree with me I say I wish there was :-\