Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. private ["_car","_lightR1","_lightR2","_lightB1","_lightB2","_lightW1","_lightW2","_b1exists","_r1exists"];
  2. _car = _this select 0;
  3. if(isServer and isDedicated)exitWith{};
  4. while{!(alive _car)}do{sleep 1;};
  5. for [{_a=0},{_a < 1},{_a=_a}] do
  6. {
  7. waitUntil {_car animationPhase "BeaconsStart" > 0};
  8. if (_car animationPhase "Beacon4" > 0 and _car animationPhase "Beacon4" < 0.5 and _b1exists = false) then
  9. {
  10. _lightB1 = "#lightpoint" createVehicleLocal getpos ( _car );
  11. _lightB1 attachTo [_car,[0,0,0],"pollights_pos"];
  12. _lightB1 setLightBrightness 0.4;
  13. _lightB1 setLightAmbient[ 0.0, 0.0, 0.1 ];
  14. _lightB1 setLightColor[ 0, 0, 1 ];
  15. _lightB1 setLightAttenuation[20,4,4,0];
  16. _b1exists = true;
  17. }else
  18. {
  19. if (_car animationPhase "Beacon4" > 0.5 and _b1exists = true) then {
  20. deleteVehicle _lightB1;
  21. _b1exists = false;
  22. }
  23. };
  24.  
  25. if (_car animationPhase "Beacon1" > 0.5 and _car aimationPhase "Beacon1" < 1.0) then
  26. {
  27. _lightR1 = "#lightpoint" createVehicleLocal getpos ( _car );
  28. _lightR1 attachTo [_car,[0,0,0],"pollights_pos"];
  29. _lightR1 setLightBrightness 0.4;
  30. _lightR1 setLightAmbient[ 0.1, 0.0, 0.0 ];
  31. _lightR1 setLightColor[ 1, 0, 0 ];
  32. _lightR1 setLightAttenuation[20,4,4,0];
  33. }else
  34. {
  35. deleteVehicle _lightR1;
  36. };
  37.  
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement