Heyho, ich hab folgendes "Script" bisher immer über die Konsole ausgeführt.
Gibt es eine Möglichkeit das ganze über bestimmte Tastenkombinationen bzw. im Scrollradmenü auszulösen und wieder abzuschalten.
Wenn Ihr euch das ganze schon anschaut, kann man vielleicht den zweiten Scriptteil direkt in den ersten einsetzen, sodass man Zwei Koordinaten jeweils auf rechts oder links zuweisen kann?
Spoiler anzeigen
[] spawn {
private _lightTime = 0.25;
private _vehicle = vehicle player;
private _lightBlue = [0.1, 0.1, 20];
private _lightLeft = "#lightpoint" createVehicleLocal getPos _vehicle;
sleep 0.2;
_lightLeft setLightColor _lightBlue;
_lightLeft setLightBrightness 0.2;
_lightLeft setLightAmbient [0.1,0.1,1];
private _offset = switch (typeOf _vehicle) do { case "C_Offroad_01_F": { [-0.375, 0.0, 0.56]; }; case "B_MRAP_01_F": { [-0.37, -1.9, 0.7]; }; case "C_SUV_01_F": { [0.38, 2.24, -0.53]; }; case "C_Hatchback_01_sport_F": { [-0.35,-0.2,0.25]; }; case "B_Heli_Light_01_F": { [-0.37, 0.0, -0.80]; }; case "B_Heli_Transport_01_F": { [-0.5, 0.0, 0.81]; };
};
_lightLeft lightAttachObject [_vehicle, _offset];
_lightLeft setLightAttenuation [0.07, 0, 1000, 130];
_lightLeft setLightIntensity 10;
_lightLeft setLightFlareSize 0.38;
_lightLeft setLightFlareMaxDistance 150;
_lightLeft setLightUseFlare true;
private _lightRight = "#lightpoint" createVehicleLocal getPos _vehicle;
sleep 0.2;
_lightRight setLightColor _lightBlue;
_lightRight setLightBrightness 0.2;
_lightRight setLightAmbient [0.1,0.1,1];
_offset = switch (typeOf _vehicle) do { case "C_Offroad_01_F": { [0.37, 0.0, 0.56]; }; case "B_MRAP_01_F": { [0.37, -1.9, 0.7]; }; case "C_SUV_01_F": { [-0.40, 2.24, -0.53]; }; case "C_Hatchback_01_sport_F": { [0.35,-0.2,0.25]; }; case "B_Heli_Light_01_F": { [0.37, 0.0, -0.80]; }; case "B_Heli_Transport_01_F": { [0.5, 0.0, 0.81]; };
};
_lightRight lightAttachObject [_vehicle, _offset];
_lightRight setLightAttenuation [0.07, 0, 1000, 130];
_lightRight setLightIntensity 10;
_lightRight setLightFlareSize 0.38;
_lightRight setLightFlareMaxDistance 150;
_lightRight setLightUseFlare true;
_lightLeft setLightDayLight true;
_lightRight setLightDayLight true;
private _leftBlue = true;
while {alive _vehicle} do { if !(_vehicle getVariable "lights") exitWith {}; if (_leftBlue) then { _lightRight setLightBrightness 0.0; sleep 0.05; _lightLeft setLightBrightness 6; } else { _lightLeft setLightBrightness 0.0; sleep 0.05; _lightRight setLightBrightness 6; }; _leftBlue = !_leftBlue; sleep _lightTime; };
deleteVehicle _lightLeft;
deleteVehicle _lightRight;
};
[] spawn {
private _lightTime = 0.25;
private _vehicle = vehicle player;
private _lightBlue = [0.1, 0.1, 20];
private _lightLeft = "#lightpoint" createVehicleLocal getPos _vehicle;
sleep 0.2;
_lightLeft setLightColor _lightBlue;
_lightLeft setLightBrightness 0.2;
_lightLeft setLightAmbient [0.1,0.1,1];
private _offset = switch (typeOf _vehicle) do { case "C_Offroad_01_F": { [-0.375, 0.0, 0.56]; }; case "B_MRAP_01_F": { [-0.37, -1.9, 0.7]; }; case "C_SUV_01_F": { [0.63, -2.36, 0.04]; }; case "C_Hatchback_01_sport_F": { [-0.35,-0.2,0.25]; }; case "B_Heli_Light_01_F": { [-0.37, 0.0, -0.80]; }; case "B_Heli_Transport_01_F": { [-0.5, 0.0, 0.81]; };
};
_lightLeft lightAttachObject [_vehicle, _offset];
_lightLeft setLightAttenuation [0.07, 0, 1000, 130];
_lightLeft setLightIntensity 10;
_lightLeft setLightFlareSize 0.38;
_lightLeft setLightFlareMaxDistance 150;
_lightLeft setLightUseFlare true;
private _lightRight = "#lightpoint" createVehicleLocal getPos _vehicle;
sleep 0.2;
_lightRight setLightColor _lightBlue;
_lightRight setLightBrightness 0.2;
_lightRight setLightAmbient [0.1,0.1,1];
_offset = switch (typeOf _vehicle) do { case "C_Offroad_01_F": { [0.37, 0.0, 0.56]; }; case "B_MRAP_01_F": { [0.37, -1.9, 0.7]; }; case "C_SUV_01_F": { [-0.63, -2.36, 0.04]; }; case "C_Hatchback_01_sport_F": { [0.35,-0.2,0.25]; }; case "B_Heli_Light_01_F": { [0.37, 0.0, -0.80]; }; case "B_Heli_Transport_01_F": { [0.5, 0.0, 0.81]; };
};
_lightRight lightAttachObject [_vehicle, _offset];
_lightRight setLightAttenuation [0.07, 0, 1000, 130];
_lightRight setLightIntensity 10;
_lightRight setLightFlareSize 0.38;
_lightRight setLightFlareMaxDistance 150;
_lightRight setLightUseFlare true;
_lightLeft setLightDayLight true;
_lightRight setLightDayLight true;
private _leftBlue = true;
while {alive _vehicle} do { if !(_vehicle getVariable "lights") exitWith {}; if (_leftBlue) then { _lightRight setLightBrightness 0.0; sleep 0.05; _lightLeft setLightBrightness 6; } else { _lightLeft setLightBrightness 0.0; sleep 0.05; _lightRight setLightBrightness 6; }; _leftBlue = !_leftBlue; sleep _lightTime; };
deleteVehicle _lightLeft;
deleteVehicle _lightRight;
};
Danke für eure Hilfe!
MfG,
fixle2011.