Jump to content
elnod

lookAt and fire with tank

Recommended Posts

Hey, I'm new to scripting and I'm just trying a basic script where a Varsuk aims at a building and fires its main armament.

 

 

_tank1 = tank1;

_tank1 lookAt markerPos "building1";
_tank1 fire ((weapons tank1) select 0);

 

This is what I have so far, it fires the cannon alright but it does so at the same time as it aims its machine gun at the building. I want it to aim the cannon rather than the machine gun. Any ideas?

Share this post


Link to post
Share on other sites

Managed to get it working with the following:

 

 

_tank1 = tank1;

_tank1 doWatch markerPos "building1";
sleep 3;
_tank1 fire ((weapons tank1) select 0);

 

Now I want to make it fire HE rounds exclusively rather than AP. 

Share this post


Link to post
Share on other sites

loadMagazine

e.g for the slammer

h = tank spawn {
	params[ "_tank" ];
	_turret = ( fullCrew [ _tank, "gunner" ] select 0 select 3 );
	if !( isNil "_turret" ) then {
		_tank selectWeaponTurret ["cannon_120mm",_turret];
		_tank loadMagazine [_turret, "cannon_120mm", "16Rnd_120mm_HE_shells_Tracer_Red"];
		_tank doWatch markerPos "building1";
		_tank fire "cannon_120mm";
	};
};

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

×