Attaching dynamic lights to actors (ZScript)

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

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

Attaching dynamic lights to actors (ZScript)

Post by Rip and Tear »

Previously, it was possible to attach a ZScript-defined dynamic light to an actor with the target pointer, but at some point recently that was removed. There should be some other way of attaching ZScript-defined lights to actors.

Attaching lights is far simpler than manually managing light positions (especially since SetOffset was exposed to ZScript). Furthermore, because you can't attach ZScript-defined lights to an actor anymore, the DONTLIGHTSELF flag can no longer be used with these lights.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Attaching dynamic lights to actors (ZScript)

Post by Nash »

Rip and Tear wrote:Furthermore, because you can't attach ZScript-defined lights to an actor anymore, the DONTLIGHTSELF flag can no longer be used with these lights.
This is the biggest downside, IMO

On the other hand, the performance improvement gained from this change was desperately needed. Aaaaa
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Attaching dynamic lights to actors (ZScript)

Post by Matt »

Here's the sort of thing I ended up doing:
Spoiler:
though it could also be possible to have an actor inherit from the dynamic light actor (but making sure to call Actor.Tick() in its Tick override)
Post Reply

Return to “Feature Suggestions [GZDoom]”