Jump to content
Sign in to follow this  
scottdog62

help with charge script

Recommended Posts

Trying to work on a charge script for one of my missions, still very much a beginner.

 

What I want atm the moment is that so when the script is activated, the AI charge(move) forward, without stops and doing all the covering and fire ect.


I'm also looking for a way to make the AI randomly fire their weapons at different times to each other during the charge.

 

So the script needs to be activated by the init of the squad leader.


// charge script



{	
	_x setUnitPos "UP";
	_x disableAI "FSM"; 
	_x disableAI "Cover";
	_x disableAi "SUPPRESION";
} forEach units _this;

_this setSpeedMode "FUll";

while {{alive _x} count units _this > 0} do
{ 

	

	sleep 5;
	_this setCombatMode "BLUE";
	sleep 10;	
	_this setCombatMode "RED";
};


The way I've tried making the AI fire at different intervals is by changing their CombatMode with a loop, what i want is for the AI in the squad to randomly fire differently to each other. anyone know of a good way?

 

Serena's helped with most of my script.

And also I've finished a few noob tutorials for arma 3 scripting, anyone know of any good tutorials that are just a step up from fockers beginner tutorial?

 

 




 

Share this post


Link to post
Share on other sites
Guest

The 'next level' will probably be to learn all the damn wiki and trying to understand Bohemia / Missions scripts.

Remember that you have a command doFire.

Share this post


Link to post
Share on other sites
7 hours ago, scottdog62 said:


// charge script



{	
	_x setUnitPos "UP";
	_x disableAI "FSM"; 
	_x disableAI "Cover";
	_x disableAi "SUPPRESION";
} forEach units _this;

_this setSpeedMode "FUll";

while {{alive _x} count units _this > 0} do
{ 

	

	sleep 5;
	_this setCombatMode "BLUE";
	sleep 10;	
	_this setCombatMode "RED";
};

 

 




 

Probably removing those disable lines from the top should be a start? And I am assuming that the AI are from different sides so they should automatically chose a random target.

 

Right?

Share this post


Link to post
Share on other sites

You probably only need to disableAI "AUTOCOMBAT" then set behavior to "AWARE".

Makes the AI unit head straight towards the waypoint/move order.

 

Cheers

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
Sign in to follow this  

×