dwarf_spider_droid_driver.sqf 860 B

12345678910111213141516171819202122232425262728293031
  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,1.45]];
  13. //_aidrive AddUniform "SWOP_tacticdroid_black_F_spec";
  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. };