Jump to content
Sign in to follow this  
paecmaker

make tank turrets point at certain ways?

Recommended Posts

I am trying to make an old battlefield in the editor and wonder if you can make empty tanks point their turrets other ways than forward?

Share this post


Link to post
Share on other sites

Add a crew for empty tank: use commands assignascommander/gunner etc. Then use setdir for commander or gunner? To point turret in some direction or on some object. In the end delete crew from tank: command deletevehicle. Should work.

Share this post


Link to post
Share on other sites

thanks, do you know the code for it? or where to search for the codes?

Share this post


Link to post
Share on other sites

All codes (assignas, deletevehicle, setdir, dowatch etc) you can find on Bi wiki or here (search function). I suggest to check Bi wiki there you can find all commands sometimes with short examples for Ofp,arma1 and arma 2 :)

Share this post


Link to post
Share on other sites

This should be easily done with the animate command eg:

nameTank animate ["mainTurret", 0.25];

But I have tried every animation source I can think of and cant get it to work.

This works:

nul = [unitName, tankName, "markerName"] execVM "turretdir.sqf";

eg: nul = [man1, tank1, "mkr1"] execVM "turretdir.sqf";


private ["_unit","_tank","_mkr","_mkrpos"];
_unit = _this select 0;
_tank = _this select 1;
_mkr = _this select 2;

_unit moveInGunner _tank;
_mkrpos = getMarkerPos _mkr;
_unit doWatch _mkrpos;
sleep 3;
unassignVehicle _unit;
_unit setPos _mkrpos;
deleteVehicle _unit;
_tank engineOn false;

Edited by PELHAM
switch engine off

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  

×