Jump to content
Sign in to follow this  
driftingnitro

Force Tank Shooting Helicopter

Recommended Posts

I'm trying to make a trigger that forces a tank to use their cannon on a helicopter by using the fireAtTarget function but it seems to not be working. Does anyone know how I should go about this. I have a feeling this may not be the right way in the first place. I also tried to unitRecord but recording a ground unit shooting doesn't seem to turn the turret.

_handle = tank1 fireAtTarget [unit3,"cannon_125mm"];
tank2 = this fireAtTarget [unit3,"cannon_125mm"];

Share this post


Link to post
Share on other sites

If the heli is hovering or on the ground use this:

tank doWatch heli;
waitUntil{sleep .1; tank aimedAtTarget [heli] > 0.98};
tank fireAtTarget [heli, weapons tank select 0];

If the heli is moving:

[]spawn{
while{alive heli}do{
	waitUntil{
		tank doWatch heli;
		sleep 1;
		tank aimedAtTarget [heli] > 0.98;
	};
tank fireAtTarget [heli, weapons tank select 0];
};
};

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  

×