Advertisement
Guest User

Untitled

a guest
Sep 9th, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1.  
  2. flareBrightness = 1;
  3. flareAttenuation = [1, 2, 2, 2, 500, 700];
  4. flareDelay = 22;
  5.  
  6. flareFunction = {
  7.  
  8. _color = [];
  9. switch (typeOf _this) do
  10. {
  11. case "F_40mm_Red": { _color = [1,0,0];};
  12. case "F_40mm_White": {_color = [1,1,1];};
  13. case "F_40mm_Green": {_color = [0,1,0]};
  14. case "F_40mm_Yellow": {_color = [1, 1, 0];};
  15. };
  16. _light="#lightpoint"createVehicleLocal(position _this);
  17. _light setLightBrightness flareBrightness;
  18. _light setLightAmbient _color;
  19. _light setLightColor _color;
  20. _light lightAttachObject[_this,[0,0,0.5]];
  21. _light setLightAttenuation flareAttenuation;
  22. _light spawn {
  23. sleep flareDelay;
  24. deleteVehicle _this;
  25. };
  26. };
  27.  
  28. {
  29. _x addEventHandler ["Fired", {
  30. _this select 6 spawn {
  31.  
  32. sleep 3;
  33. _this remoteExec ["flareFunction", 0];
  34. };
  35. }];
  36.  
  37. } forEach allUnits;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement