Forum Jump :

Author Message


Posts: 11
Rank:


Level: Member

Country: us
Location: Fort Georgia
Occupation: Student
Age: 24
In-game name: Eric Dean

 
#1 Posted at 2015-02-17 14:22        
     
I'm trying to get my mission to start out with a Firing Squad. However units just run around and fire randomly. Is there anyway to keep them still and time the units shots?


Author Message


Posts: 146
Rank:


Level: Member

Country: my
Location: Sabah
Occupation: No Occupations
Age: 20
In-game name: Phantom_Wolf

 
#2 Posted at 2015-02-17 17:21        
     
this disableAI "MOVE";

Then maybe you should add a waypoint for them to 'destroy' the target, so that they point at him and shoot properly.
If you require the firing squad to move again later, simple put in enableAI instead.

Added 5 minutes later:

Found some good commands for ya.

_unit doTarget TheTarget;
_unit doFire TheTarget;

This post was edited by Phantom_Wolf (2015-02-17 17:26, ago)

I have no signature.

Advertisement


Author Message


Posts: 11
Rank:


Level: Member

Country: us
Location: Fort Georgia
Occupation: Student
Age: 24
In-game name: Eric Dean

 
#3 Posted at 2015-02-17 18:04        
     
Almost perfect, now I'm having the problem that the prisoners are going prone, anyone know a way to stop that? Also ummm they just fire anyways is there a way for me to get them to wait to fire until a certain time?

Added 7 minutes later:

Second problem solved

This post was edited by Eric Dean (2015-02-17 18:18, ago)


Author Message


Posts: 16
Rank:


Level: Member

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

 
#4 Posted at 2015-02-17 22:11        
     
You can use the setUnitPos command in their init. Just make them always standing or crouching.

Here you can look it up: setUnitPos


Author Message


Posts: 1515
Rank:


Level: Member

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

 
#5 Posted at 2015-02-18 13:10        
     
also try unit disableAI "FSM"


Author Message


Posts: 3
Rank:


Level: Member

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

 
#6 Posted at 2015-02-18 18:16        
     
Hi,

try this

squad.sqf

// Squad basic script
// Command for Init Box of the Squad leader
// _nul = [this] execVM "squad.sqf";


_lead_alpha = _this select 0; // _lead_alpha is the Squad leader (object)

_alpha = units group _lead_alpha; // _alpha is the whole Squad (array)

// set combat mode for each member of the Squad

{_x setCombatMode "Blue"} forEach _alpha;

/* combat modes
"BLUE" - never fire
"GREEN" - hold fire - defend only
"WHITE" - hold fire - engage at will
"YELLOW" - fire at will
"RED" - fire at will - engage at will
*/

// set movement behaviour for each member of the Squad

{_x setBehaviour "CARELESS"} forEach _alpha;

/* behaviour modes
"CARELESS" - stand upright, use roads if possible, no cover, ignores hostiles
"SAFE" - stand upright, use roads if possible, no cover 
"AWARE" - stand upright/kneel down, use roads mostly, occasionally using cover 
"COMBAT" - stand upright/kneel down, using cover whenever possible
"STEALTH" - prone, using cover whenever possible
*/

and then I used a simple trigger to activate the target/fire script

target.sqf

// Squad targets and attacks given target (activated by trigger)
// group Squad

_alpha = units group p1; //p1 is the name of the Squad leader given in the editor

//if you would use a global variable for the Squad in the squad.sqf 
//	you could use it again here and don't need to use the group command

_alpha doTarget target1; //target1 is the name of the target given in the editor
_alpha doFire target1;

Be advised that the Squad will spawn in a combat-ready-mode, with weapons ready and looking for enemies. But they will not shoot and after a few seconds they change their behaviour to careless. Also trigger are working really slowly in ArmA so there will be some delay before the Squad will actually open fire.