droideka_driver.sqf 858 B

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