Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Hey, I tried that, but unfortunately attachTo won't allow it to move with the head movements. Believe me I tried this quite a few times. But it's a limitation of the attachTo command.
I thought of this. I'll look into it.
@Oh yeah Mr. Murdock, A strobe mode would be awesome :D
Maybe needs a GetIn and GetOut EH.....
Now, i don't know very much at all at scripting, but I did come across a script on the internet I have been using, very similar to this, that uses the initplayerlocal.sqf and two other .sqf files.
The light works for me inside and out of cars, it just creates a light point in front of the player on a keypressed (Y). During the day it can be difficult to see the light, altering the color and raising brightness seem to help. Just like your mod.
I've only tried this for my Single Player RPG. So idk about Multiplayer...
initplayerlocal.sqf :
player setVariable ["lightIsOn", false];
fnc_turnLightOn = {
light1 = "#lightpoint" createVehicleLocal [0,0,0];
light1 setLightBrightness 0.33;
light1 setLightAmbient [0.2,0.2,0.2];
light1 setLightColor [2,2,5];
light1 lightAttachObject [player1,[0,+2.7,+1]];
};
fnc_turnLightOff = {
deleteVehicle light1;
};
onKeyPress = compile preprocessFile "keypressed.sqf";
waituntil {!(IsNull (findDisplay 46))};
(findDisplay 46) displaySetEventHandler ["KeyDown", "_this call onKeyPress"];
----------
flashlight.sqf :
if (player getVariable "lightIsOn") then {
[] call fnc_turnLightOff; player setVariable ["lightIsOn", false];
} else {
[] call fnc_turnLightOn; player setVariable ["lightIsOn", true];
};
----------
keypressed.sqf :
private "_handled";
_key = _this select 0;
_shift = _this select 1;
_handled = false;
switch _shift do
{
case 21 : // pressed Y
{
nul = [] execVM "flashlight.sqf";
_handled = true;
};
};
_handled;
----------
I hope this helps you maybe on your vehicle issue! Good luck!
*By the way, I've noticed that the light from the flashlight (on shoulder) shines through the flashlight when in third person and sprinting, when your body goes back and forth. Perhaps making the light smaller on the shoulder would make this a bit more realistic, so that its more of a dot than a bright circle. Of course, thats up to you.*
*Oh and a green flashlight choice would be super duper uber cool too ;)*
Thanks everyone for your kind words and feedback.
I also added a green filter as requested to help with hunting and fishing at night (the green light is less likely to spook animals and fish).
And I also extended the reach of the light out a few more feet (meters).
Download the newest version. I fixed that.
Oh yeah, crap. Haha. You're right. Hmm. Well, um...added to the bug list.
http://steamcommunity.com/sharedfiles/filedetails/?id=836781212