Hallo,
wie schon im Titel steht haben wir ein Problem, und zwar geht das Blaulicht vom Tempest Repair nicht obwohl es (meiner Meinung nach) richtig eingefügt wurde.
Ich wollte einfach mal fragen ob ihr eine Ahnung habt, woran es liegt.
Alle anderen Fahrzeuge blinken fröhlich rum (Selbst der Tempest Tanken) nur der Repair will nicht.
Steht nichts in den Logs, und wenn ich Shift L drücke kommt auch keine Error meldung
Hier unsere KeyHandeler:
Code
//L Key?
case 38: {
//If cop run checks for turning lights on.
if (_shift && playerSide in [west,independent]) then {
if (vehicle player != player && (typeOf vehicle player) in ["C_Offroad_01_F","C_Van_02_transport_F","B_MRAP_01_F","C_SUV_01_F","C_Van_01_box_F","C_Hatchback_01_sport_F","B_Heli_Light_01_F","B_Heli_Transport_01_F","I_MRAP_03_F","O_Truck_03_fuel_F","O_Truck_03_repair_F"]) then {
if (!isNil {vehicle player getVariable "lights"}) then {
if (playerSide isEqualTo west) then {
[vehicle player] call life_fnc_sirenLights;
} else {
[vehicle player] call life_fnc_medicSirenLights;
};
_handled = true;
};
};
};
Alles anzeigen
unsere Medic lights.sqf
Spoiler anzeigen
Code
private ["_veh","_lightRed","_lightWhite","_lightBlue","_lightsOn","_brightnessHigh","_brightnessLow","_attach","_leftLights","_rightLights","_type","_attenuation"];
_veh = (_this select 0);
_type = typeOf _veh;
_sun = (sunOrMoon < 1);
if (isNil "_veh" || isNull _veh || !(_veh getVariable "lights")) exitWith {};
_lightRed = [255, 0, 0];
_lightWhite = [255, 255, 255];
_lightBlue = [0, 0, 255];
_lightOrange = [255, 200, 0];
if (_sun) then
{
_brightnessLow = 0;
_brightnessHigh = 40;
_attenuation = [0.001, 3000, 0, 125000];
} else {
_brightnessLow = 0;
_brightnessHigh = 475;
_attenuation = [0.001, 3000, 0, 500000];
};
_flashes = 3;
_flashOn = 0.1;
_flashOff = 0.01;
_leftLights = [];
_rightLights = [];
_attach =
{
_isLight = _this select 0;
_color = _this select 1;
_position = _this select 2;
_light = "#lightpoint" createVehicleLocal getPos _veh;
_light setLightBrightness 250;
_light setLightAmbient [0,0,0];
_light setLightAttenuation _attenuation;
_light setLightIntensity 800;
_light setLightFlareSize 2;
_light setLightFlareMaxDistance 300;
_light setLightUseFlare true;
_light setLightDayLight true;
switch (_color) do
{
case "red": { _light setLightColor _lightRed; };
case "white": { _light setLightColor _lightWhite; };
case "blue": { _light setLightColor _lightBlue; };
case "orange": { _light setLightColor _lightOrange; };
};
if (_isLight) then
{
_leftLights pushBack [_light, _position];
} else {
_rightLights pushBack [_light, _position];
};
_light lightAttachObject [_veh, _position];
};
switch (_type) do
{
case "C_Offroad_01_F":
{
[true, "blue", [-0.44, 0, 0.525]] call _attach;
[false, "blue", [0.345, 0, 0.525]] call _attach;
//[false, "orange", [0.575, -2.95, -0.77]] call _attach;
//[false, "orange", [-0.645, -2.95, -0.77]] call _attach;
//[false, "white", [0.61, 2.2825, -0.355]] call _attach;
//[false, "white", [-0.695, 2.2825, -0.355]] call _attach;
};
case "C_SUV_01_F":
{
[true, "blue", [-0.39, 2.28, -0.52]] call _attach;
[false, "blue", [0.38, 2.28, -0.52]] call _attach;
//[false, "orange", [-0.86, -2.75, -0.18]] call _attach;
//[false, "orange", [0.86, -2.75, -0.18]] call _attach;
[true, "blue", [0.8, 1.95, -0.48]] call _attach;
[false, "blue", [-0.8, 1.95, -0.48]] call _attach;
};
case "O_Truck_03_Repair_F":
{
[true, "blue", [-1 , 2.8, 0.627]] call _attach;
[false, "blue", [1 , 2.8, 0.627]] call _attach;
[true, "blue", [1 , 2.8, 0.627]] call _attach;
[false, "blue", [-1 , 2.8, 0.627]] call _attach;
//[false, "orange", [-0.86, -2.75, -0.18]] call _attach;
//[false, "orange", [0.86, -2.75, -0.18]] call _attach;
};
case "O_Truck_03_fuel_F":
{
[true, "blue", [-1 , 1 , 1.027]] call _attach;
[false, "blue", [1 , 1, 1.027]] call _attach;
//[false, "orange", [-0.86, -2.75, -0.18]] call _attach;
//[false, "orange", [0.86, -2.75, -0.18]] call _attach;
};
case "C_Hatchback_01_sport_F":
{
[true, "blue", [-0.03, -0, 0.2]] call _attach;
[false, "blue", [-0.03, -0, 0.2]] call _attach;
//[true, "red", [-0.8, -2.25, -0.3]] call _attach;
//[true, "red", [0.78, -2.25, -0.3]] call _attach;
//[true, "blue", [0.75, 1.615, -0.52]] call _attach;
//[false, "blue", [-0.8, 1.615, -0.525]] call _attach;
};
case "B_MRAP_01_F":
{
[true, "blue", [-0.85, -0.9, 0.6]] call _attach;
[false, "blue", [0.85, -0.9, 0.6]] call _attach;
[false, "blue", [-0.93, -2.8, 0.6]] call _attach;
[true, "blue", [0.93, -2.8, 0.6]] call _attach;
//[true, "white", [-0.85, 1.475, -0.75]] call _attach;
//[true, "white", [0.85, 1.475, -0.75]] call _attach;
};
case "B_MRAP_01_hmg_F":
{
[true, "blue", [-0.85, -0.9, 0.6]] call _attach;
[false, "blue", [0.85, -0.9, 0.6]] call _attach;
[false, "blue", [-0.93, -2.8, 0.6]] call _attach;
[true, "blue", [0.93, -2.8, 0.6]] call _attach;
//[true, "white", [-0.85, 1.475, -0.75]] call _attach;
//[true, "white", [0.85, 1.475, -0.75]] call _attach;
};
case "I_MRAP_03_F":
{
[true, "blue", [-0.85, -0.9, 0.6]] call _attach;
[false, "blue", [0.85, -0.9, 0.6]] call _attach;
//[false, "blue", [-0.93, -2.8, 0.6]] call _attach;
//[true, "blue", [0.93, -2.8, 0.6]] call _attach;
[false, "blue", [-0.85, 1.475, -0.75]] call _attach;
[true, "blue", [0.85, 1.475, -0.75]] call _attach;
};
case "B_Quadbike_01_F":
{
[true, "blue", [-0.07, 1, -0.7]] call _attachLight;
[false, "blue", [0.07, 1, -0.7]] call _attachLight;
};
case "I_MRAP_03_F":
{
[true, "blue", [-0.85, -0.9, 0.6]] call _attach;
[false, "blue", [0.85, -0.9, 0.6]] call _attach;
[false, "blue", [-0.93, -2.8, 0.6]] call _attach;
[true, "blue", [0.93, -2.8, 0.6]] call _attach;
[false, "blue", [-0.85, 1.475, -0.75]] call _attach;
[true, "blue", [0.85, 1.475, -0.75]] call _attach;
};
case "C_Van_01_box_F":
{
[true, "blue", [-0.9, -0.292, 1.427]] call _attach;
[false, "blue", [0.9, -0.292, 1.427]] call _attach;
}
};
_lightsOn = true;
while {(alive _veh)} do
{
if (!(_veh getVariable "lights")) exitWith {};
if (_lightsOn) then
{
for [{_i=0}, {_i<_flashes}, {_i=_i+1}] do
{
{ (_x select 0) setLightBrightness _brightnessHigh; } forEach _leftLights;
uiSleep _flashOn;
{ (_x select 0) setLightBrightness _brightnessLow; } forEach _leftLights;
uiSleep _flashOff;
};
{ (_x select 0) setLightBrightness 0; } forEach _leftLights;
for [{_i=0}, {_i<_flashes}, {_i=_i+1}] do
{
{ (_x select 0) setLightBrightness _brightnessHigh; } forEach _rightLights;
uiSleep _flashOn;
{ (_x select 0) setLightBrightness _brightnessLow; } forEach _rightLights;
uiSleep _flashOff;
};
{ (_x select 0) setLightBrightness 0; } forEach _rightLights;
};
};
{ deleteVehicle (_x select 0) } foreach _leftLights;
{ deleteVehicle (_x select 0) } foreach _rightLights;
_leftLights = [];
_rightLights = [];
Alles anzeigen
und hier unsere Medic Siren lights.sqf
Code
#include "..\..\script_macros.hpp"
/*
File: fn_sirenLights.sqf
Author: Bryan "Tonic" Boardwine
Description:
Lets play a game! Can you guess what it does? I have faith in you, if you can't
then you have failed me and therefor I lose all faith in humanity.. No pressure.
*/
private ["_vehicle","_trueorfalse"];
_vehicle = param [0,objNull,[objNull]];
if (isNull _vehicle) exitWith {}; //Bad entry!
if (!(typeOf _vehicle in ["C_Offroad_01_F","O_Truck_03_repair_F","C_SUV_01_F","C_Hatchback_01_sport_F","C_Van_01_box_F","B_Truck_01_transporter_F","B_Heli_Light_01_F","O_Heli_Light_02_unarmed_F","I_Heli_Light_03_unarmed_F","O_Truck_03_fuel_F"])) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
_trueorfalse = _vehicle getVariable ["lights",false];
if (_trueorfalse) then {
_vehicle setVariable ["lights",false,true];
} else {
_vehicle setVariable ["lights",true,true];
[_vehicle,0.22] remoteExec ["life_fnc_medicLights",RCLIENT];
};
Alles anzeigen
Wenn jemand den Fehler findet, oder eine Lösung, wäre es nett, wenn er diese mitteilen könnt