droideka_driver.sqf 966 B

1234567891011121314151617181920212223242526272829303132333435
  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. _curators = objectCurators _vic;
  18. { _x addCuratorEditableObjects [[_aidrive], true] } forEach _curators;
  19. _vic addEventHandler ["Killed", {
  20. params ["_unit", "_killer", "_instigator", "_useEffects"];
  21. [_unit] spawn macro_fnc_name(remove_attached_objects)
  22. }];
  23. _vic addMPEventHandler ["MPKilled", {
  24. params ["_unit", "_killer", "_instigator", "_useEffects"];
  25. [_unit] spawn macro_fnc_name(remove_attached_objects)
  26. }];
  27. };