Attaching dynamic lights to actors (ZScript)

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

Moderator: GZDoom Developers

Attaching dynamic lights to actors (ZScript)

Postby Rip and Tear » Wed May 15, 2019 11:43 am

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
Rip and Tear
King of creative usernames
 
Joined: 02 May 2017
Operating System: Mac OS X 10.8 or later

Re: Attaching dynamic lights to actors (ZScript)

Postby Nash » Wed May 15, 2019 12:11 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Attaching dynamic lights to actors (ZScript)

Postby Matt » Wed May 15, 2019 1:41 pm

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)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest