Page 1 of 1

Attaching dynamic lights to actors (ZScript)

PostPosted: Wed May 15, 2019 11:43 am
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.

Re: Attaching dynamic lights to actors (ZScript)

PostPosted: Wed May 15, 2019 12:11 pm
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

Re: Attaching dynamic lights to actors (ZScript)

PostPosted: Wed May 15, 2019 1:41 pm
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)