Jump to content

Leijonakuningas

Pre Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Leijonakuningas

  • Rank
    Newbie
  1. Leijonakuningas

    Tv Guided System

    It can be fixed by deleting the original projectile and spawning a copy of it. It's also necessary to make sure the script doesn't get called when you're using a different weapon. In TVS\scripts\init.sqf file, you'll find the line. _unit addEventHandler ["FIRED", {if ((player == gunner (_this select 0)) or ((player == driver (_this select 0)) and not (isPlayer gunner (_this select 0)))) then {_this spawn Nux_fnc_tvs_start;};}]; Replace it with: _unit addEventHandler ["FIRED", { if (_this select 4 == (_this select 0 getVariable "Nux_tvs_ammo")) then {if ((player == gunner (_this select 0)) or ((player == driver (_this select 0)) and not (isPlayer gunner (_this select 0)))) then {_this spawn Nux_fnc_tvs_start;};}}]; Now TVS won't interfere with using the vehicle's other weapons. Let's move on to copying the projectile. In TVS\scripts\tvg.sqf file you'll have this piece of code. Nux_fnc_tvs_start = { private ["_unit", "_weapon", "_missile", "_validammo"]; _unit = vehicle (_this select 0); _weapon = _this select 1; _missile = _this select 6; _validammo = _unit getvariable "Nux_tvs_ammo"; Replace it with Nux_fnc_tvs_start = { private ["_unit", "_weapon", "_missile", "_validammo"]; sleep 0.5; _unit = vehicle (_this select 0); _weapon = _this select 1; _missile = _this select 6; _validammo = _unit getvariable "Nux_tvs_ammo"; private _vectordir = vectorDir _missile; private _vectorup = vectorup _missile; private _pitchBank = _missile call BIS_fnc_getPitchBank; private _speed = velocityModelSpace _missile; private _pos = position _missile; deletevehicle _missile; _missile = _validammo createVehicle _pos; _missile setVectorDirAndUp [_vectorDir, _vectorUp]; [_missile, _pitchbank select 0, 0] call BIS_fnc_setPitchBank; _missile setVelocityModelSpace _speed; The missile/bomb will now be copied and the copy will be guidable. The script should function with no other changes. Tested with the current version of Arma 3 on planes and static AT turrets.
×