Better Flashlight
Добавить в игру через Steam
Нажмите «Подписаться»
На странице Steam войдите в аккаунт, если потребуется.
Подписаться
О материале
«Better Flashlight» — материал мастерской Garry’s Mod. Аддоны, карты, персонажи и инструменты для песочницы. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
A simple script to enhance the HL2 flashlight, in third person the flashlight will always come from the player's view instead of the player model's hand, gives players the ability to choose a custom color and texture for it, and some more
For Developers
This addon overrides the behavior of the default flashlight, but I made sure you can still check for the player's flashlight.
Instead of using Player:FlashlightIsOn() you can use Player:GetNWBool("FlashlightIsOn"), Player:FlashlightIsOn() will always return false if the user is using this addon
The addon respects the Player:CanUseFlashlight() property and runs the PlayerSwitchFlashlight event to check if the player can switch it's flashlight on or off.
As for sound, it does not use or add a custom sound, it uses the default HL2 soundscript "HL2Player.FlashLightOn" and "HL2Player.FlashLightOff", so basic sound replacements should work.
Client ConVars
| Name | Default | Purpose |
|---|---|---|
| cl_betterflashlight_local_player_only_shadows | 1 | If set to 1, only your flashlight will cast shadows |
| cl_betterflashlight_local_player_only_hl2_style | 0 | If set to 1, only your flashlight will "pullback" when too close to a wall or object, ignoring other players settings |
| cl_betterflashlight_glow | 1 | If set to 1, player flashlights will emit a glow when looked at |
| cl_betterflashlight_beam | 1 | If set to 1, player flashlights will emit a visible beam |
| cl_betterflashlight_beam_alpha | 100 | The transparency of the beam of a player flashlight |
| cl_betterflashlight_config_r | 255 | Your flashlight's color. Red component |
| cl_betterflashlight_config_g | 255 | Your flashlight's color. Green component |
| cl_betterflashlight_config_b | 255 | Your flashlight's color. Blue component |
| cl_betterflashlight_config_a | 255 | Your flashlight's color. Alpha component. NOT USED. |
| cl_betterflashlight_config_near_z | 96 | Your flashlight's extra near-z distance, this will try to avoid casting your own shadow |
| cl_betterflashlight_config_far_z | 96 | Your flashlight's far-z distance, this is how far it reaches before fading away |
| cl_betterflashlight_config_angle_lerp | 0 | Your flashlight's smooth turning factor, 0 is disabled |
| cl_betterflashlight_config_fov | 60 | Your flashlight's field-of-view |
| cl_betterflashlight_config_texture | "effects/flashlight001" | Your flashlight's texture. |
| cl_betterflashlight_bone_id | "" | The ID of the bone where the visual glow and beam will originate from, if it exists in the player-model. |
| cl_betterflashlight_config_hl2_style | 1 | Your flashlight's HL2-style setting. |
Server ConVars
| Name | Default | Purpose |
|---|---|---|
| sv_betterflashlight_override_default | 1 | Enable or disable overriding the default flashlight |
| sv_betterflashlight_follow_viewpunch | 1 | If set to 1, player flashlights will follow their viewpunch |
| sv_betterflashlight_disable_in_vehicle | 0 | Not recommended, buggy. If set to 1, flashlight is always off when in a vehicle |
| sv_betterflashlight_disable_in_vehicle_only_driver | 1 | Works with setting above, the restriction will only apply if you are the driver of the vehicle |
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.