og10drive.sqf 948 B

12345678910111213141516171819202122232425262728293031323334353637
  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. _vic addEventHandler ["Killed", {
  21. params ["_unit", "_killer", "_instigator", "_useEffects"];
  22. [_unit] spawn macro_fnc_name(remove_attached_objects)
  23. }];
  24. _vic addMPEventHandler ["MPKilled", {
  25. params ["_unit", "_killer", "_instigator", "_useEffects"];
  26. [_unit] spawn macro_fnc_name(remove_attached_objects)
  27. }];
  28. };