Home   Help Search Login Register  

Author Topic: Making soldiers to shoot  (Read 1393 times)

0 Members and 1 Guest are viewing this topic.

Offline Yasirotta

  • Members
  • *
Making soldiers to shoot
« on: 02 Aug 2009, 17:24:52 »
Greetings boys and old farts ! (just kidding  :D)
Mission is almost done, but one thing bothers me. How can i put soldiers shoot choppers with weapons like M16 ? I know the DoFire command, but in my mission is four enemy choppers witch makes DoFire command impossible to use wise.

So, anyone know simple script for about 8 soldiers to shoot every chopper near base ?

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Making soldiers to shoot
« Reply #1 on: 02 Aug 2009, 20:04:31 »
Have you tried doTarget and then dofire? Like this:

Code: [Select]
soldier1 doTarget chopper; soldier1 doFire chopper
Also, if you group the soldiers, you could try the CommandTarget and CommandFire commands.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Yasirotta

  • Members
  • *
Re: Making soldiers to shoot
« Reply #2 on: 03 Aug 2009, 15:26:47 »
Well, i could....
But problem is again that i have more than one chopper. I can make own triggers for every chopper, and every man in base to shoot chopper. One problem can be, that if chopper1 and chopper2 cames same time in that airspace, dont know what happens (unless have just to try that...)

I can do that, but it will make lots of triggers and commands...
Four diffrent choppers, and about 15 to 20 soldiers in base...
« Last Edit: 03 Aug 2009, 15:28:46 by Yasirotta »

Walter_E_Kurtz

  • Guest
Re: Making soldiers to shoot
« Reply #3 on: 04 Aug 2009, 03:16:49 »
My understanding is that soldiers don't shoot at vehicles unless the damage they'd inflict would be sufficient to penetrate the armour. Values for this are in the main config for the game. Some Mods change these values, so you might see machinegunners shooting at helicopters in ECP and FFUR, etc.

They still wouldn't use M16s though, so I suggest using Fox's Invisible targets.

Place an Invisible, Medium Priority, Infantry target by each chopper, and name them appropriately: heli1, helitarget1. Then use a general script that will position the target over the chopper:
Code: (MoveTarget.sqs) [Select]
_heli = _this select 0
_target = _this select 1

#setpos
if (alive _heli) then {_target setPos GetPos _heli} else {deleteVehicle _target; exit}
~0.05
goto "setpos"
The script just needs to be called when necessary, in the following manner
[heli1, helitarget1] exec "MoveTarget.sqs"

If the helicopter is destroyed, the Invisible Target should be deleted and the script exit; so setDammage 1 the choppers when they're no longer needed.

Units tend not to engage beyond 250 metres in unmodified OFP, so you may need some tweaks to get it to play as you want, for instance:
 - change the Priority of the target, so that actual enemy soldiers are shot at in preference
 - use reveal to alert different groups of soldiers to each Invisible Target, maybe in conjunction with doTarget or commandTarget (for the group leader)