Flashlight+ [minimod]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
RicardoLuis0
Posts: 47
Joined: Tue Aug 21, 2018 9:31 pm
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil

Flashlight+ [minimod]

Post by RicardoLuis0 »

This mod is based on Steve's Flashlight, but features several improvements:
  • Fully ZScript, no ACS
  • Can be safely removed from savegames (if you press the "uninstall" button in settings)
  • Multi-beam flashlight (can be toggled off)
  • Per-player settings in multiplayer (user CVARs instead of server CVARs)
Spoiler: Multiplayer
Spoiler: Changelog
flashlight_plus.pk3
You do not have the required permissions to view the files attached to this post.
Last edited by RicardoLuis0 on Sun Sep 26, 2021 11:17 pm, edited 3 times in total.
Plasmazippo
Posts: 101
Joined: Sat Sep 25, 2021 11:55 am
Operating System: Windows 10 ARM
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Re: Flashlight+ [minimod]

Post by Plasmazippo »

This is like a configurable version of the "fancy" flashlight beams in DarkDoomZ. I dig having one beam for spill and another for spot. Well done, Ricardo, ficou ótimo!

However, there's one tiny issue: the beam origin doesn't follow your height in real time, only on activation. For example, if you turn it on while standing then crouch, the beam will stay with the origin floating over your head. And if you turn it on while crouching, when you stand up the beam will stay at hip height.

I tried to troubleshoot this myself, but I'm no coder or programmer, I just look at the Zscript file and get lost trying to find where the "accompany actor height" parameter would go.
User avatar
RicardoLuis0
Posts: 47
Joined: Tue Aug 21, 2018 9:31 pm
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil

Re: Flashlight+ [minimod]

Post by RicardoLuis0 »

Plasmazippo wrote:However, there's one tiny issue: the beam origin doesn't follow your height in real time, only on activation. For example, if you turn it on while standing then crouch, the beam will stay with the origin floating over your head. And if you turn it on while crouching, when you stand up the beam will stay at hip height.
Ah, thanks for noticing, that was an oversight when calculating the Z offset of the light. I added the player viewheight directly to the position offset (head/shoulder/viewcenter), instead of calculating it later when setting the position per tick. It's fixed now.
Prem0
Posts: 5
Joined: Wed Sep 19, 2018 12:23 pm

Re: Flashlight+ [minimod]

Post by Prem0 »

Ricardo, If you're still here could you please also add a check to see if the player is alive or not since the light stays on even when the player is dead, or maybe leave it as is and add sounds of it turning on and off.
User avatar
RicardoLuis0
Posts: 47
Joined: Tue Aug 21, 2018 9:31 pm
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil

Re: Flashlight+ [minimod]

Post by RicardoLuis0 »

Prem0 wrote:please also add a check to see if the player is alive or not
Here, added some code to turn the light off when a player dies.
You do not have the required permissions to view the files attached to this post.

Return to “Gameplay Mods”