Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
irontiger

Avatar / Picture

Sergeant
Registered:
Posts: 71
Reply with quote  #1 
I am making a cut-scene where broken Tiger is recovered and towed.
I've used this post to make tank turret point back.
It did not work in IF1944, however changing lines:
_unit doWatch _mkrpos to _unit doTarget _mkrpos and deleteVehicle _unit to deleteGroup _unit

makes that script workable ... but there is one problem.
If there is any shooting around, the turret reverses forward itself, while the _unit is really GONE.
Ghosts ?
So I gave up, and use INIT field instead, and then with a trigger a tanker is deleted.

this moveInGunner TIGER; this doWatch INVISIBLE_OBJECT;

My question is - could that script (from bistudio ) be corrected, as I would find it more reliable for more complex moves.







0
BRS

Captain
Registered:
Posts: 195
Reply with quote  #2 
I changed code a little and it works fine while testing it.
Hope that's what you wanted.

turretdir.sqf:
//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;
sleep 3;

_mkrpos = getmarkerPos _mkr;
(gunner _unit) doWatch ( _mkrpos );

// needs some time to rotate, adapt value to fit if required
sleep 30;

unassignVehicle _unit;
_unit setPosATL _mkrpos;
deleteVehicle _unit;

// may be not all needed
_tank disableAI "MOVE";
_tank disableAI "TARGET";
_tank disableAI "AUTOTARGET";
_tank disableAI "FSM";

_tank engineOn false;
0
irontiger

Avatar / Picture

Sergeant
Registered:
Posts: 71
Reply with quote  #3 
BS, Thank you !!!!!!!!!!!!!!!!!!!!!!!!

Those cut-scenes are so time consuming that your code snippet is equal to GOLD.
I am new to scripting, still learning and help like this simply speeds things up.
0
irontiger

Avatar / Picture

Sergeant
Registered:
Posts: 71
Reply with quote  #4 
BS, Works like a Swiss watch in my mission.
I have towed a tank along Russian line, and the tank turret stood still !
Original script was causing bunch of errors in a log, and your code is CLEAN !
Once more, thanks.
Now I can even make hatches open ... etc, all in one SQF file !
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.