Home   Help Search Login Register  

Author Topic: Supressing Fire by enemy AI  (Read 3342 times)

0 Members and 1 Guest are viewing this topic.

RM-Dog

  • Guest
Supressing Fire by enemy AI
« on: 05 Jan 2004, 12:36:11 »
First off I'm a newb at scripting. So anymore than basics I am lost.
Trying to get enemy M2 mg positions to lay down supressing fire as west team approaches their position or the enemy ai are moving up under cover fire.
 Tried "dofire" and "commandfire" but does not have desired effect as they shoot at only one object./unit.
Any help much appreciated

RM-Dog
 :-\

DBR_ONIX

  • Guest
Re:Supressing Fire by enemy AI
« Reply #1 on: 05 Jan 2004, 22:32:41 »
I would also like this script.. I want covering fire from
1. Snipers
2 MG
Both on the hill around the target
And you give them the go code from the radio..
But I can't get them to fire randomly (Or the snipers take random targets, only emenys)
Could some ont give it a go..?
- Ben

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re:Supressing Fire by enemy AI
« Reply #2 on: 08 Jan 2004, 13:57:47 »
Cant help you there, but snipers dont shoot in the general direction of units...they are trained to be accurate and they target out specific units.....  :gunman:     :afro:

m21man

  • Guest
Re:Supressing Fire by enemy AI
« Reply #3 on: 08 Jan 2004, 15:27:44 »
Suppressive fire isn't very useful unless you've got terrain detail set to very high. Otherwise, there isn't much cover to hide in.

DBR_ONIX

  • Guest
Re:Supressing Fire by enemy AI
« Reply #4 on: 10 Jan 2004, 16:01:28 »
Cant help you there, but snipers dont shoot in the general direction of units...they are trained to be accurate and they target out specific units.....  :gunman:     :afro:
Yup, the terrorists :P
Nah, how could this be done.. Anyone?
--
There is enough cover, its in a small base, where the enemy would duck behind sandbag walls, and buildings etc..

Just found the other thread :
http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=14835
:)
Not right for the snipers though..
- Ben

DBR_ONIX

  • Guest
Re:Supressing Fire by enemy AI
« Reply #5 on: 14 Jan 2004, 20:42:15 »
BTW, the snipers would take radom targets, and hit them, and keep taking out targets untill the enemy try to hit them, and retreat/move postion.. Not fire in the direction..
- Ben
PS, this mission isn't meant to be perfectly realistic.. Just farily :P

Extreme Studios

  • Guest
Re:Supressing Fire by enemy AI
« Reply #6 on: 07 Feb 2004, 15:56:21 »
I have a solution that works with mounted guns and snipers if they're positioned in certain way. (i'm using the m2 as an example here) set a way point for the m2 as "HOLD", and "OPEN FIRE, ENGAGE AT WILL". where you want it to start firing (this can be quite far away from the m2). The m2 should now fire upon the enemy from the area around where the "HOLD" waypoint is right the way back to the m2. Hope this simple idea works!  ;)

FormatC

  • Guest
Re:Supressing Fire by enemy AI
« Reply #7 on: 07 Feb 2004, 16:45:05 »
unitname Fire ["weapon" , "ammo" , "typeofshot"]


example is :

unitname Fire ["M16","Single"]

place it in trigger say east detected by west or just west present,, who ever you want to set off the trigger...... multi shooters can be placed... in same activation field..

unitname Fire ["M16","Single"] ; unitname Fire ["m16".single"] so on

Dubieman

  • Guest
Re:Supressing Fire by enemy AI
« Reply #8 on: 07 Feb 2004, 19:16:25 »
Not sure about scripting this, but how about when the certain big guns detct the enemies apporaching then a script creates an invisible target (from the invisible targets add on) that is on the west side. Then the guns start firing in and at that target. You could use man targets above the west positions that get updated and when the enemy gets in "range" then the targets dissappear and the guns target real units. ;)

You could create multiple targets near the enemy postion or marker marking where they are to simulate sporadic gunfire at the enemies.... :o

DBR_ONIX

  • Guest
Re:Supressing Fire by enemy AI
« Reply #9 on: 15 Feb 2004, 20:29:38 »
Hmm, what about using the script to move an invisible target around... Like a civ. one and dofire thing only on the gun..!
If I can make that wiggle maker to work :|
- Ben

Johan_D

  • Guest
Re:Supressing Fire by enemy AI
« Reply #10 on: 16 Feb 2004, 21:57:36 »
A simple script, where one can active a squad member, then from the action menu select "supress", then the selected unit must do a dofire AT an HIDDEN target (until told otherwise or out of ammo)
The hidden target moves around randomly very close to the enemy positions.. When the hidden target is close to an enemy it is set to crouch, (simulate taking cover) untill the hidden target is away from him.

Or, you should be able to temporary do a knowsabout for a second or 5, let your unit fire, and then a knowsabout on another random selected enemy.

Hmmm..

Bluelikeu

  • Guest
Re:Supressing Fire by enemy AI
« Reply #11 on: 20 Jun 2004, 16:56:08 »
unitname Fire ["weapon" , "ammo" , "typeofshot"]


example is :

unitname Fire ["M16","Single"]

place it in trigger say east detected by west or just west present,, who ever you want to set off the trigger...... multi shooters can be placed... in same activation field..

unitname Fire ["M16","Single"] ; unitname Fire ["m16".single"] so on


This is the right idea to do it, however it is easier to do it with a script that is activated when an MG Turret fires. I'll submit a a beta version below, and release one that I tested for a while

I would use this on Turrets and not vehicles or units, because of the setvelocity usage. You can specify the number of bullets you want the Turret to fire, before it exits, and waits to be activated again, (_NumBullets = 20).

Something like this:
Init:

   This AddEventHandler [{fired},{_This exec {SFire.sqs}}]


Script:

#Variables
_Unit = _This Select 0
_Weapon = _This Select 1
_NumBullets = 20

#RemoveHandler
_Unit RemoveAllEventHandlers {fired}


#BeginSupressingFire
~0.1
_Unit Fire _Weapon
_Unit setvelocity [(Random 30)-(Random 30),(Random 30)-(Random 30),10]
_NumBullets = (_NumBullets -1)
?_NumBullets < 1 : Goto "Exit"
?Not( Alive _Unit) : Goto "Exit"
Goto "BeginSupressingFire"


#Exit
~0.1
_Unit SetVelocity [0,0,0]
_Unit addeventhandler [{fired},{_This exec {SFire.sqs}}]
Exit

Neptune

  • Guest
Re:Supressing Fire by enemy AI
« Reply #12 on: 25 Jun 2004, 07:55:05 »
Suppressive fire is not like "just shooting in the general direction".
Even suppressive fire is aimed in a way.
Suppresive fire is a tactic to make enemies duck behind cover and KEEP them there. If you would lay under inaccurate suppresive fire you would come from your cover to go into the fight again easily.

Now immagine the bullets constantly hitting your cover and hitting the ground allaround you...so that moving is the LAST thing you would think of. THAT'S suppresive fire.

I think the script would be more realistic if you make units switch through targets quick and give them a burst of bullets every second.

DBR_ONIX

  • Guest
Re:Supressing Fire by enemy AI
« Reply #13 on: 27 Jun 2004, 11:51:20 »
Hmm, there is a DDay machingegun script..
I might have a look at it :)

But yeah, if you've got bullets hitting everywhere around you, I agree you won't come out.. But the kamakazie ai will :(

The stopmove or something command might help?
Or the hide command (AI teammates seem to run round in cirlces for 30secs, then stand behind a tree ::))

- Ben

FlidMerchant

  • Guest
Re:Supressing Fire by enemy AI
« Reply #14 on: 27 Jun 2004, 23:40:31 »
I think a better way would be to just have the weapon firing for effect, and create the bullets via a script. I'm not sure if camcreate works with bullets, I don't do scripting myself, but there should be some way to make bullets land all around a unit without hitting them, it seems just like an artillery script but with bullets. Alternatively if you are using the M2, you might want a higher dispersion as it looks a bit stupid having all the bullets hit in one place.