niemand eine Idee? @script /Vincent/dev/null

[Ein Tutorial] Das sagenumwobene Blaulichtscript von der die Rede war...
-
- Altis Life
-
script /Vincent/dev/null -
10. Mai 2016 um 00:55
-
-
ich habe leider auch das gleiche Problem, was eigentlich schon gefixt sein sollte.
Sobald ich Shift L drücke passiert nichts, außer das das Licht vom Fahrzeug selbst angeht.
Eine Fehlermeldung o.Ä bekomme ich jedoch auch nicht.Benutze Version 3.1.4.8
Falls es nur am keyHandler liegt, weiß jemand ob das auch über die setupaction geht?
Sowohl bei Polizei als auch bei den Medics? Hatten das Problem anfangs, dass das Blaulicht bei den Medics nicht ging. Mittlerweile aber schon gefixt.
-
Sowohl bei Polizei als auch bei den Medics? Hatten das Problem anfangs, dass das Blaulicht bei den Medics nicht ging. Mittlerweile aber schon gefixt.
Das Problem hat sich erledigt, habe jedoch das gleiche was du gerade sagtest:
Blaulicht funktioniert nichtBei Cops gehts nun, bei den Medics nicht..
-
Wie hast du es behoben? Wir haben das ziemlich umständlich gefixt und auch nicht wirklich sauber
-
Wie hast du es behoben? Wir haben das ziemlich umständlich gefixt und auch nicht wirklich sauber
Ich denke, du hast mich falsch verstanden.
Ich habe den Fehler behoben, dass es nirgendwo mehr geht. Jetzt geht es bei ein Cops aber nicht bei den Medics. thinking -
Ich werde mal Nox anhauen und hier die bearbeiteten Dateien reinstellen
-
-
Im TUT steht nur, dass man unter "class functions" etwas einfügen muss.
Bei "class cop" musste auch nichts rein. -
checks trotzdem mal, schaden kann es nicht und ich meine mich da an einen falschen Dateinamen oder so zu erinnern
-
Fehler besteht aber auch in der 4.4 also wird es wahrscheinlich nicht daran liegen.
Die einzigen Änderungen waren glaube ich in der fn_emergencyLights.sqf ist, aber wie gesagt nicht die schönste Lösung. Immerhin funktioniert es jetzt für beide Fraktionen
C: fn_emergencyLights.sqf
Alles anzeigen/* File: fn_emergencyLights.sqf Author: Vincent H. aka AGPHeaddikilla aka Yoghurt aka Yogurette Link: http://forums.bistudio.com/showthread.php?157474-Offroad-Police-sirens-lights-and-underglow Original Author: mindstorm, modified by Adanteh Description: Adds the light effect to cop vehicles, specifically the offroad. License: MIT License Copyright (c) 2016 Vincent Heins (http://www.allgameplay.de/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ private ["_vehicle", "_sendUnit", "_engineTimeout", "_defaultAttenuation", "_playerSide", "_classname", "_lights", "_lightObjects"]; _vehicle = [_this, 0, ObjNull, [ObjNull]] call BIS_fnc_param; _sendUnit = [_this, 1, ObjNull, [ObjNull]] call BIS_fnc_param; if (isNull _vehicle || isNull _sendUnit) exitWith {}; _engineTimeout = getNumber(missionConfigFile >> "emergencyLightsConfig" >> "engineTimeout"); _defaultAttenuation = getArray(missionConfigFile >> "emergencyLightsConfig" >> "defaultAttenuation"); _playerSide = toLower (str side _sendUnit); if(_playerside != "independent") then { if(_playerSide == "west") exitWith {}; _playerside = "independent" }; _classname = typeOf _vehicle; _lightObjects = []; { private ["_status", "_color", "_ambientColor", "_brightnessMinimum", "_brightnessMaximum", "_position", "_attenuation", "_phaseTime", "_timeout"]; _status = getNumber(_x >> "status"); _color = getArray(_x >> "color"); _ambientColor = getArray(_x >> "ambientColor"); _brightnessMinimum = getNumber(_x >> "brightnessMinimum"); _brightnessMaximum = getNumber(_x >> "brightnessMaximum"); _position = getArray(_x >> "position"); _attenuation = getArray(_x >> "attenuation"); _phaseTime = getNumber(_x >> "phaseTime"); _timeout = getNumber(_x >> "timeout"); _light = "#lightpoint" createVehicleLocal getPos _vehicle; _light setLightColor _color; _light setLightAmbient _ambientColor; _light lightAttachObject [_vehicle, _position]; if (_status == 1) then { _light setLightBrightness _brightnessMaximum; } else { _light setLightBrightness _brightnessMinimum; }; if ((count _attenuation) <= 0) then { _light setLightAttenuation _defaultAttenuation; } else { _light setLightAttenuation _attenuation; }; _light setLightIntensity 10; _light setLightFlareSize 0.38; _light setLightFlareMaxDistance 150; _light setLightUseFlare true; _light setLightDayLight true; _lightObjects pushBack [_light, _status, ([[_phaseTime], 0, nil, [0]] call BIS_fnc_param), time, ([[_timeout], 0, nil, [0]] call BIS_fnc_param), _brightnessMinimum, _brightnessMaximum]; } forEach ("true" configClasses (missionConfigFile >> "emergencyLightsConfig" >> _playerSide >> _classname)); if ((count _lightObjects) <= 0) exitWith {}; if (_sendUnit == player) then { vehicle player setVariable ["lights", true, true]; _players = []; { if (player != _x) then { _players pushBack _x; }; } forEach playableUnits; [vehicle player, player] remoteExec ["life_fnc_emergencyLights", _players]; }; _lightObj = ObjNull; while { (alive _vehicle) } do { if(!(_vehicle getVariable ["lights", false])) exitWith {}; { private ["_lightObj", "_time", "_timeout", "_oldTime", "_status", "_brightnessMinimum", "_brightnessMaximum", "_extra"]; _lightObj = [_x, 0, ObjNull, [ObjNull]] call BIS_fnc_param; _time = [_x, 2, .2, [0]] call BIS_fnc_param; _timeout = [_x, 4, 0, [0]] call BIS_fnc_param; _oldTime = ([_x, 3, time, [0]] call BIS_fnc_param) + _timeout; _status = [_x, 1, 0, [0]] call BIS_fnc_param; _brightnessMinimum = [_x, 5, 0, [0]] call BIS_fnc_param; _brightnessMaximum = [_x, 6, 0, [0]] call BIS_fnc_param; _extra = 0; if (!isEngineOn _vehicle) then { _extra = _engineTimeout; }; if (_time == 0) then { if (isEngineOn _vehicle) then { _time = (random [0.1, 0.2, 0.3]); } else { _time = (random [0.1, 0.2 + 0.2, 0.3 + 0.2]); }; }; if ((time - _oldTime) > (_time + _extra)) then { if (_status == 0) then { _lightObj setLightBrightness _brightnessMinimum; _x set [1, 1]; } else { _lightObj setLightBrightness _brightnessMaximum; _x set [1, 0]; }; _x set [3, time]; sleep (_timeout + _extra); }; } forEach _lightObjects; sleep 0.1; }; { deleteVehicle (_x select 0); } forEach _lightObjects;
-
Fehler besteht aber auch in der 4.4 also wird es wahrscheinlich nicht daran liegen.
Die einzigen Änderungen waren glaube ich in der fn_emergencyLights.sqf ist, aber wie gesagt nicht die schönste Lösung. Immerhin funktioniert es jetzt für beide Fraktionen
C: fn_emergencyLights.sqf
Alles anzeigen/* File: fn_emergencyLights.sqf Author: Vincent H. aka AGPHeaddikilla aka Yoghurt aka Yogurette Link: http://forums.bistudio.com/showthread.php?157474-Offroad-Police-sirens-lights-and-underglow Original Author: mindstorm, modified by Adanteh Description: Adds the light effect to cop vehicles, specifically the offroad. License: MIT License Copyright (c) 2016 Vincent Heins (http://www.allgameplay.de/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ private ["_vehicle", "_sendUnit", "_engineTimeout", "_defaultAttenuation", "_playerSide", "_classname", "_lights", "_lightObjects"]; _vehicle = [_this, 0, ObjNull, [ObjNull]] call BIS_fnc_param; _sendUnit = [_this, 1, ObjNull, [ObjNull]] call BIS_fnc_param; if (isNull _vehicle || isNull _sendUnit) exitWith {}; _engineTimeout = getNumber(missionConfigFile >> "emergencyLightsConfig" >> "engineTimeout"); _defaultAttenuation = getArray(missionConfigFile >> "emergencyLightsConfig" >> "defaultAttenuation"); _playerSide = toLower (str side _sendUnit); if(_playerside != "independent") then { if(_playerSide == "west") exitWith {}; _playerside = "independent" }; _classname = typeOf _vehicle; _lightObjects = []; { private ["_status", "_color", "_ambientColor", "_brightnessMinimum", "_brightnessMaximum", "_position", "_attenuation", "_phaseTime", "_timeout"]; _status = getNumber(_x >> "status"); _color = getArray(_x >> "color"); _ambientColor = getArray(_x >> "ambientColor"); _brightnessMinimum = getNumber(_x >> "brightnessMinimum"); _brightnessMaximum = getNumber(_x >> "brightnessMaximum"); _position = getArray(_x >> "position"); _attenuation = getArray(_x >> "attenuation"); _phaseTime = getNumber(_x >> "phaseTime"); _timeout = getNumber(_x >> "timeout"); _light = "#lightpoint" createVehicleLocal getPos _vehicle; _light setLightColor _color; _light setLightAmbient _ambientColor; _light lightAttachObject [_vehicle, _position]; if (_status == 1) then { _light setLightBrightness _brightnessMaximum; } else { _light setLightBrightness _brightnessMinimum; }; if ((count _attenuation) <= 0) then { _light setLightAttenuation _defaultAttenuation; } else { _light setLightAttenuation _attenuation; }; _light setLightIntensity 10; _light setLightFlareSize 0.38; _light setLightFlareMaxDistance 150; _light setLightUseFlare true; _light setLightDayLight true; _lightObjects pushBack [_light, _status, ([[_phaseTime], 0, nil, [0]] call BIS_fnc_param), time, ([[_timeout], 0, nil, [0]] call BIS_fnc_param), _brightnessMinimum, _brightnessMaximum]; } forEach ("true" configClasses (missionConfigFile >> "emergencyLightsConfig" >> _playerSide >> _classname)); if ((count _lightObjects) <= 0) exitWith {}; if (_sendUnit == player) then { vehicle player setVariable ["lights", true, true]; _players = []; { if (player != _x) then { _players pushBack _x; }; } forEach playableUnits; [vehicle player, player] remoteExec ["life_fnc_emergencyLights", _players]; }; _lightObj = ObjNull; while { (alive _vehicle) } do { if(!(_vehicle getVariable ["lights", false])) exitWith {}; { private ["_lightObj", "_time", "_timeout", "_oldTime", "_status", "_brightnessMinimum", "_brightnessMaximum", "_extra"]; _lightObj = [_x, 0, ObjNull, [ObjNull]] call BIS_fnc_param; _time = [_x, 2, .2, [0]] call BIS_fnc_param; _timeout = [_x, 4, 0, [0]] call BIS_fnc_param; _oldTime = ([_x, 3, time, [0]] call BIS_fnc_param) + _timeout; _status = [_x, 1, 0, [0]] call BIS_fnc_param; _brightnessMinimum = [_x, 5, 0, [0]] call BIS_fnc_param; _brightnessMaximum = [_x, 6, 0, [0]] call BIS_fnc_param; _extra = 0; if (!isEngineOn _vehicle) then { _extra = _engineTimeout; }; if (_time == 0) then { if (isEngineOn _vehicle) then { _time = (random [0.1, 0.2, 0.3]); } else { _time = (random [0.1, 0.2 + 0.2, 0.3 + 0.2]); }; }; if ((time - _oldTime) > (_time + _extra)) then { if (_status == 0) then { _lightObj setLightBrightness _brightnessMinimum; _x set [1, 1]; } else { _lightObj setLightBrightness _brightnessMaximum; _x set [1, 0]; }; _x set [3, time]; sleep (_timeout + _extra); }; } forEach _lightObjects; sleep 0.1; }; { deleteVehicle (_x select 0); } forEach _lightObjects;
Kann ich das einfach ohne Bedenken in der 3.1.4.8 ersetzten oder muss ich was abändern?
-
Haben das wie gesagt in der 4.4 am laufen. Probier es am besten einfach mal aus. Sollte auf dem ersten Blick funktionieren.
-
Haben das wie gesagt in der 4.4 am laufen. Probier es am besten einfach mal aus. Sollte auf dem ersten Blick funktionieren.
Funktioniert leider immer noch nicht. Auch hier keine Logs o.Ä
-
@'blackfisch' vielleicht noch eine idee?
-
Hä? Was? Ehm... Nö, leider nicht wirklich gerade...
-
Kurze Frage, was muss ich einfügen damit East(ADAC) auch ein Gelblicht hat?.
Hab in der emergencyLightsConfig.hpp bereits class east und das Fahrzeug hinzugefügt
-
Hallo,
Bei mir wird das Blau Licht nur bei der Person angezeigt, welche es aktiviert hat.
Guten Morgen,
ich muss mich leider auch @Lukas B. anschließen, da man bei mir auch nur selbst das Blaulicht sehen kann.
Normalerweise versuche ich die Probleme immer selbst zu lösen, kann jedoch bei dem Script keinen Grund feststellen warum das so sein kann.Ich benutze die 4.4r4, ich vermute aber, dass es nicht daran liegt, da es bei euch/dir vermutlich auch auf einer der 4.4 Versionen läuft.
Vielleicht hast du ja doch eine Idee woher das kommen könnte
Grüße
Kallumongo -
-
Hat niemand eine Idee zum Thema:
Kurze Frage, was muss ich einfügen damit East(ADAC) auch ein Gelblicht hat?.
Hab in der emergencyLightsConfig.hpp bereits class east und das Fahrzeug hinzugefügt
-
Da ich nun eine geraume Zeit nichts machen konnte (*hust* Sperrung... *hust*), ist dieser Thread wohl ein wenig zerlaufen.
Um die letzte Frage zu beantworten:
PoweredByte Jawohl - du musst in der
C: emergencyLightsConfig.hpp
Alles anzeigenclass emergencyLightsConfig { engineTimeout = 0.05; defaultAttenuation[] = {0.181, 0, 1000, 130}; class <side> //dies ist die Arma 3 - "Seite" | möglich wäre west, blufor, east, opfor, resistance, independent, civilian { class <classname> { class <sirene> { ... }; }; }; };
Sollten noch weitere Fragen bestehen, gehe ich diesen gerne nach.
Mit freundlichen (Rückkehr-)Grüßen
Vincent
-