create_itt.sqf 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #include "../../config_macros.hpp"
  2. params[
  3. ["_vic",objNull ,[player]],
  4. ["_attach_pos",[0,0,0],[[1,2,3]],3]
  5. ];
  6. //if we cant use sleep ,spawn this cript
  7. if (!canSuspend) exitWith {
  8. _vic spawn macro_fnc_name(atte_uav_init);
  9. };
  10. //if not the server,exit
  11. if (!isServer) exitWith {};
  12. //give some time for stomper to spawn
  13. sleep 1;
  14. //check if still alive or if deleted
  15. if(isNull _vic || !(alive _vic)) exitWith {
  16. };
  17. // ITT for troop transport;
  18. _atte_mens = createVehicle [MACRO_QUOTE(macro_new_vehicle(atte_itt,cabin)), getPosASL _vic, [], 0, ""];
  19. // Set the name and attach it to the Stomper;
  20. _atte_mens attachTo [_vic,_attach_pos];
  21. // make it invisible;
  22. //(_atte_mens) setobjecttextureglobal [0,""];
  23. // make it invulnerable remove the ammo
  24. //_atte_mens hideObjectGlobal true;
  25. _atte_mens allowDamage false;
  26. _atte_mens setvehicleammo 0;
  27. _atte_mens lockDriver true;
  28. [_atte_mens, 20] call ace_cargo_fnc_setSpace;
  29. //[_atte_mens, true] remoteExec ["hideObjectglobal", 0];