Jump to content
M1ke_SK

helicopter shooting on ground unit at loiter waypoint

Recommended Posts

General idea:

Helicopter flying around marker (center_marker) in loiter waypoint. This helicopter randomly shooting from gunner (side gun) at random markers placed around center_marker, or fire random rocket at random of those markers. I don't want to shoot players, but around them to have the feeling being shoot at (suppressed).

 

Idea of make this happen:

1. Helicopter loiter around marker

2. Gunner shooting at random marker (target)

3. Helicopter doing flyover with launching rocket at random target, then resuming loiter.

 

So far I am trying to set loiter and gunner shooting from side of helicopter.

 

Here is what I got so far ( mission example ): https://www.sendspace.com/file/tojdl6

 

 

Share this post


Link to post
Share on other sites

Hi Mike!  I think placing an invisible target and moving it around periodically will work for you.  I downloaded your sample, and in the fire.sqf I commented out your loop that fired and put in this code below.   It creates an Opfor invisible target and attaches it to target unit (15 meters in front of player).  I also attached a sphere so we can see where the target is attached.  The chopper fires on the target as you move around.  No need to force vehicle to fire, because once the invisible target is revealed they will fire on it constantly.

 

If you want it to stop firing on invisible target sometimes, I think you can set enableSimulation false on it.  Then set it true again to resume firing.

 

You can change it to randomly relocate the target's position periodically so not always firing directly in front of target unit.

 

Works for me!  Hope that helps.

_bulletMagnetUnitType = "O_TargetSoldier";
_bulletMagnet = createVehicle [_bulletMagnetUnitType, [0,0,0], [], 0, "CAN_COLLIDE"];
_bulletMagnet lockTurret [[0],true]; // target object has a gunner position, so lock it so player isn't offered "get in gunner" option when near dog
createVehicleCrew _bulletMagnet;
_bulletMagnet enableCollisionWith _target;
_bulletMagnet attachTo [_target,[0,15,2]];
group _vehicle reveal _bulletMagnet;
_vehicle doWatch _bulletMagnet;
_vehicle reveal _bulletMagnet;


_sphere = createVehicle ["Sign_Sphere25cm_F", [0,0,0], [], 0, "CAN_COLLIDE"];
_sphere attachTo [_bulletMagnet,[0,0,0]];
player allowDamage false;

 

Share this post


Link to post
Share on other sites

Interesting approach. I will make adjustments.

 

Thank you

 

This is kind of situation, where it is good to try to explain situation you want to achieve, because when you take strait way to solution of your problem in Arma, you end up doing it by complete different way. :D

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×