Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Phml

[GZDoom] Binding multiple dynamic lights to the player

Recommended Posts

I'm trying to bind multiple dynamic lights to the player, so everything can be lit up up close and then have a gradual dropoff, rather than an abrupt fall back to sector lightning.

The wiki says "it is possible to bind multiple lights to a single object/frame." However, when I do that, only the last light applied is effective.

Contents of my GLDEFS lump:

pointlight lightPlayerClose { color 1 1 1 size 64 offset 0 48 0 }

pointlight lightPlayerFar { color 0.5 0.5 0.5 size 128 offset 0 48 0 }

object DoomPlayer {
frame PLAY { light lightPlayerClose light lightPlayerFar }
}

In this situation only "lightPlayerFar" will work. At first I thought maybe I just don't see the brighter light within the bigger, dimmer one; but if I switch the order, only "lightPlayerClose" works and this is very obvious due to the smaller radius.

Any ideas? For that matter, if this is a stupid way to do what I want to do, please feel free to say so.

Share this post


Link to post
Phml said:

The wiki says "it is possible to bind multiple lights to a single object/frame." However, when I do that, only the last light applied is effective.

It's misleading and needs to be rewritten, thanks for bringing that up.

What is actually possible is to bind a light to a sprite (e.g. PLAY) and another to a frame (e.g. PLAYA) so that you have a maximum of two lights on a single object at a time.

Share this post


Link to post

Thanks!

Probably a bit silly, but I went ahead and bound the second light to PLAYA, PLAYB, PLAYC and so on, and it works like I wanted it to. :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×