Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2015-03-11 15:47        
     
Hi!

I found the script for target shooting, but the problem is that I dont know how to stop it (I want to soldier stopped firing after he fired 5 rounds.)

null=sold1 spawn {sold1 dotarget t1 ;sleep 2;while {alive t1 and alive sold1} do {sleep 0.5; gl action ["useweapon",vehicle sold1,sold1,0];}};


Author Message


Posts: 1523
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2015-03-11 16:23        
     
This may work, not tested

null=sold1 spawn {   sold1 dotarget t1 ;sleep 2;_rounds = 0;while {alive t1 and alive sold1 and  _rounds < 5} do {_rounds=_rounds+1;sleep 0.5; gl action ["useweapon",vehicle sold1,sold1,0];}}


Advertisement


Author Message


Posts: 2
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2015-03-11 17:57        
     
Thanks a lot, it works :-D