Facebook
From Anonymous, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 147
  1. params ["_barrelpitch","_barreldir","_barrelroll","_charge"];
  2.  
  3.  
  4. _theshell = "Sh_82mm_AMOS" createVehicle [getpos player select 0, getpos player select 1, 2];
  5. _pitchdegrees = _barrelpitch / 17.777777;
  6.  
  7. /* _theshell setdir _barreldir;
  8. [_theshell, _pitchdegrees, 0] call BIS_fnc_setPitchBank; */
  9.  
  10. _pitchActual = _pitchdegrees * cos _barrelroll;
  11. _dirActual = _barreldir + (_pitchdegrees * sin _barrelroll);
  12.  
  13. _vector = vectorNormalized [
  14.         sin _dirActual,
  15.         cos _dirActual,
  16.     sin _pitchActual
  17.     ];
  18. _theshell setVelocity (_vector vectorMultiply _charge);
  19.  
  20. hint (["Variables"
  21.         ,"\n_theshell", _theshell
  22.         ,"\n_pitchdegrees",_pitchdegrees
  23.         ,"\n_barreldir",_barreldir
  24.         ,"\n_barrelroll",_barrelroll
  25.         ,"\n_charge",_charge
  26.         ,"\n_pitchActual",_pitchActual
  27.         ,"\n_dirActual",_dirActual
  28.         ,"\n_vector",_vector
  29.         ,"\nspeedvector",(_vector vectorMultiply _charge)
  30.         ] joinString " : ");