dwarf_spider_droid_driver.sqf 967 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "../../config_macros.hpp"
  2. // Created by Rexi to make things move
  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. _aidrive allowDamage false;
  12. _vic attachTo [_aidrive,[0,-0.3,0]];
  13. //_aidrive AddUniform "SWOP_tacticdroid_black_F_spec";
  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. };