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
Jay0
 
 
Posts: 64
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Flashlight+ [minimod]

Post by Jay0 »

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 Jay0 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
Jay0
 
 
Posts: 64
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Flashlight+ [minimod]

Post by Jay0 »

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
Jay0
 
 
Posts: 64
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Flashlight+ [minimod]

Post by Jay0 »

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”