og10drive.sqf 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "../../config_macros.hpp"
  2. // Created by Rexi to make things move
  3. //edited by namenai
  4. params[
  5. ["_vic",objNull,[player]]
  6. ];
  7. if(isNull _vic) exitWith {
  8. };
  9. if (isServer) then {
  10. _group = createGroup east;
  11. _ai_unit = _group createUnit ["O_Soldier_VR_F", position _vic, [], 0, "CAN_COLLIDE"];
  12. _ai_unit allowDamage false;
  13. _vic attachTo [_ai_unit,[0,-0.3,4.8]];
  14. //_ai_unit AddUniform "SWOP_tacticdroid_black_F_spec";
  15. [_ai_unit, true] remoteExec ["hideObjectGlobal", 0];
  16. _ai_unit setUnitPos "down";
  17. _ai_unit setBehaviour "CARELESS";
  18. _ai_unit setSpeedMode "LIMITED";
  19. _ai_unit forceWalk true;
  20. _curators = objectCurators _vic;
  21. { _x addCuratorEditableObjects [[_aidrive], true] } forEach _curators;
  22. _vic addEventHandler ["Killed", {
  23. params ["_unit", "_killer", "_instigator", "_useEffects"];
  24. [_unit] spawn macro_fnc_name(remove_attached_objects)
  25. }];
  26. _vic addMPEventHandler ["MPKilled", {
  27. params ["_unit", "_killer", "_instigator", "_useEffects"];
  28. [_unit] spawn macro_fnc_name(remove_attached_objects)
  29. }];
  30. };