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.
Post Reply
User avatar
RicardoLuis0
 
 
Posts: 57
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil
Contact:

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
Updated 09/27/21
(3.29 KiB) Downloaded 1587 times
Last edited by RicardoLuis0 on Sun Sep 26, 2021 11:17 pm, edited 3 times in total.
Plasmazippo
Posts: 115
Joined: Sat Sep 25, 2021 11:55 am
Graphics Processor: ATI/AMD with Vulkan/Metal 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: 57
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil
Contact:

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: 6
Joined: Wed Sep 19, 2018 12:23 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): 20H2
Graphics Processor: ATI/AMD (Modern GZDoom)

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: 57
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Location: Brazil
Contact:

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.
Attachments
flashlight_plus_deathoff.pk3
(3.32 KiB) Downloaded 194 times
Post Reply

Return to “Gameplay Mods”