El script :
- Código: Seleccionar todo
_truck = _this select 0
_trailer = _this select 1
_truckdis = -2.1
_trailerdis = 1.9
_trailerlength = 12
_factor = -0.5
_trailer animate ["ani_trailer", 1];
#preconnection
? _trailer animationPhase "ani_trailer" == 1 : goto "preloop"
~0.01
goto "preconnection"
#preloop
_truck say "bv_connect"
#loop
?(not alive _truck): Exit
?(not alive _trailer): Exit
? ((_trailer animationPhase "ani_trailer2" == 1) and (speed _truck) >=55) : _truck setVelocity [(_factor*(sin getDir _truck))+(velocity _truck select 0),(_factor*(cos getDir _truck))+(velocity _truck select 1),(velocity _truck select 2)];
_trailer animate ["ani_markerlights",0];
? _truck animationPhase "ani_markerlights" == 1 : _trailer animate ["ani_markerlights",1];
_dirtruck = getdir _truck
_dirtrailer = getdir _trailer
_xx = getpos _trailer select 0
_yy = getpos _trailer select 1
_x = getpos _truck select 0
_y = getpos _truck select 1
_z = getpos _truck select 2
_trailerx = sin(_dirtrailer) * _trailerdis
_trailery = cos(_dirtrailer) * _trailerdis
_truckx = sin(_dirtruck) * _truckdis
_trucky = cos(_dirtruck) * _truckdis
_dir = (_dirtruck - _dirtrailer)
? _dir < -180 : _dir = _dir + 360
? _dir > 180 : _dir = _dir - 360
_trailer setdir (getdir _trailer + _dir * _speed * 0.0015)
_speed = speed _truck
_trailer setvelocity [velocity _truck select 0, velocity _truck select 1, velocity _truck select 2]
_trailerPos = [_xx + (_x + _truckx) - (_xx + _trailerx), _yy + (_y + _trucky) - (_yy + _trailery), _z]
_trailer setpos _trailerPos
_tempy = _y
_tempx = _x
_tempz = _z
? _trailer animationPhase "ani_trailer" == 0 : goto "exitnow"
?(speed _truck) < -0.8 : goto "wloop"
?(speed _truck) < 0.8 : goto "idle"
#wloop
~0.01
goto "loop"
#exitnow
_truck say "bv_discon"
exit
#idle
?(speed _truck) < -0.8 : goto "loop"
?(speed _truck) > 0.8 : goto "loop"
?(not alive _truck): Exit
?(not alive _trailer): Exit
? _trailer animationPhase "ani_trailer" == 0 : goto "exitnow"
_trailer animate ["ani_markerlights",0];
? _truck animationPhase "ani_markerlights" == 1 : _trailer animate ["ani_markerlights",1];
~0.01
goto "idle"
Dejo tambien el pbo con el config y los modelos 3d , muuuuuyyyy basicos y con un funcionamiento pesimo
Saludos