[ZScript] Flares

Post your example zscripts/ACS scripts/etc 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
Rip and Tear
Posts: 185
Joined: Tue May 02, 2017 3:54 pm

[ZScript] Flares

Post by Rip and Tear »

What is this?
This is a library that allows you to quickly add flares to actors. Flares are simple sprites with additive rendering. Flares will automatically follow the actor that they are attached to. Various attributes of the flare can be configured.

What does it look like?
Image

How do I use it?
Download the attached file and read the instructions, documentation, and examples provided in the contained zscript.txt file.

Feedback welcome.
Attachments
Flares.pk3
(116.64 KiB) Downloaded 303 times
User avatar
Endie
Posts: 227
Joined: Thu Mar 16, 2017 7:34 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in the void

Re: [ZScript] Flares

Post by Endie »

Nice work, but there's a way to actor check sight?

when using Decorate, you can call A_CheckSight, so if the item that carry the flare is out of player sight, it will hide the flare instantly, and when the item gets back, the flare is shown again
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: [ZScript] Flares

Post by Cherno »

Kinda related, is it possible to have a flare that is completey visible (even if it would be clipped by other scenery) if the player sees it's center, and completely hidden when the player doesn't see it's center? Basically, like a real-life lensflare works, and how most modern games do it.
User avatar
Rip and Tear
Posts: 185
Joined: Tue May 02, 2017 3:54 pm

Re: [ZScript] Flares

Post by Rip and Tear »

Cherno wrote:Kinda related, is it possible to have a flare that is completey visible (even if it would be clipped by other scenery) if the player sees it's center, and completely hidden when the player doesn't see it's center? Basically, like a real-life lensflare works, and how most modern games do it.
Endie wrote:Nice work, but there's a way to actor check sight? when using Decorate, you can call A_CheckSight, so if the item that carry the flare is out of player sight, it will hide the flare instantly, and when the item gets back, the flare is shown again
This is something I would definitely like to add in the future, but I’ve held off on it so far because I don’t have a great understanding of how multiplayer works in the GZDoom engine and I don’t want to accidentally break this library for multiplayer.
User avatar
Endie
Posts: 227
Joined: Thu Mar 16, 2017 7:34 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in the void

Re: [ZScript] Flares

Post by Endie »

Also, when i tested your attatchment, the flare was behind the column. are you using any Sprite clipping option? or it depends of the angle of view?
User avatar
Rip and Tear
Posts: 185
Joined: Tue May 02, 2017 3:54 pm

Re: [ZScript] Flares

Post by Rip and Tear »

Endie wrote:Also, when i tested your attatchment, the flare was behind the column. are you using any Sprite clipping option? or it depends of the angle of view?
I tested with a bunch of settings (including sprite clipping) and could not reproduce the issue.
User avatar
Ghost Prototype
Posts: 185
Joined: Sun May 19, 2013 12:22 pm
Location: Philadelphia

Re: [ZScript] Flares

Post by Ghost Prototype »

Well done
Spoiler:
User avatar
Rip and Tear
Posts: 185
Joined: Tue May 02, 2017 3:54 pm

Re: [ZScript] Flares

Post by Rip and Tear »

Here’s an updated version of the library which should hopefully improve performance of flares.
Attachments
Flares 1.1.pk3
(116.66 KiB) Downloaded 175 times
Post Reply

Return to “Script Library”