Jump to content
Sign in to follow this  
BLQQD

Rotating vehicle turrets on destroyed units

Recommended Posts

[RESOLVED]

Here's a good way to create a dead vehicle with a rotated turret facing and invisible target!

turretdir.sqf

private ["_tur","_tar"];

_tur = _this select 0;

_tar = _this select 1;

_tur doWatch _tar;

_tur doTarget _tar;

sleep 3;

{ doGetOut crew _tur ;sleep 0.5;deleteVehicle _x } forEach (crew _tur);

{deleteVehicle _x} forEach (crew _tar)+[_tar];

_tur setDamage 1;

Create your unit, for example a manned ZU-23

Name:

Tur1

Init Field:

nul = [Tur1, Tar1] execVM "turretdir.sqf";

Create your Target Unit, for example a US MQ-9

For a tank use a tank, for an AA gun, use an aircraft (I think it helps but I could be crazy)

Name:

Tar1

Init Field:

this setPos [position this select 0, position this select 1, 50]; this disableAI "MOVE"; hideObject this;

Adjust accordingly and enjoy!

Edited by BLQQD
[RESOLVED]

Share this post


Link to post
Share on other sites

Crew only delete when out of vehicles, you will need to shove them out.

{ _x setpos getpos [0,0,0];sleep 0.5;deleteVehicle _x } forEach (crew _tur);

you may or may not need the sleep command or move them before they die I can remember exactly.

Share this post


Link to post
Share on other sites

thx for reply, but im new to this and dont understand how to use the code u gave me.

i tried this

private ["_tur","_tar"];

_tur = _this select 0;

_tar = _this select 1;

_tur doWatch _tar;

_tur doTarget _tar;

sleep 3;

{ _x setpos getpos [0,0,0];sleep 0.5;deleteVehicle _x } forEach (crew _tur);

{deleteVehicle _x} forEach (crew _tar)+[_tar];

_tur setDamage 1;

but got

Error getPos Type Array expected object,location

i tried

doGetOut

but then

{ deleteVehicle _x } forEach (crew _tur);

still doesnt delete them

thanks in advance

Share this post


Link to post
Share on other sites

Nm got it!

Edited by BLQQD
[Resolved]

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  

×