Forum Jump :

Author Message


Posts: 2

Level: Member

Country: uk
In-game name:

#195104 Posted at 2016-11-09 17:21        
# Pierre MGI : Infinite shoot at popup target.
Name the popup taget (example: cible)
In init field of the sniper, or thru a trigger (then name the sniper also):

0 = this spawn {
  while {alive _this} do {
  _this removeMagazines (currentMagazine _this);
  _this setAmmo [primaryWeapon _this, 1];
  sleep 3;
  _this doTarget cible;
  _this doFire cible;
  sleep 7

These is always one bullet added before the shoot;
the sleep works because there is no more bullet in loaded magazine. If you let 7 bullets, dofire doesn't cope with sleep and the cadence depends on the gun hard coded parameter only.

Hi Pierre, thanks for the code.
It works great, except it only seems to work with most weapons 7.62 or above.
Any idea why that could be?
Is there a way to make it work with pistols and smaller rifle calibers?

Sorry if this is a noob question.

I'm using the quoted version of the code because I'm using simple targets.