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

Dynamic lights on picked-up weapon

Recommended Posts

As some might have seen yesterday, I've been making a Chaingun replacement that uses green cells as ammo, causing it to pulse with green light. It works fine on the pickup sprite, but I'm trying to make it continue to pulse while the player is wielding it. I've bound the light to the frame, but no light is emitted. Any ideas how to make this work?

Here is the code:

//Laser Gatling Gun
pulselight LGATGUN
    color 0 0.8 0
    size 32
    secondarySize 0
    interval 3

    frame MGUNA0 { light LGATGUN }
    frame CHGGA0 { light LGATGUN }

Share this post

Link to post

I don't think lighting works on weapon frames, since once you pick up the item, the item disappears. A better way is to have the frame spawn a thing, like smoke or sparks or something, or even an invisible dummy thing. Then use that thing to give off the light.

Share this post

Link to post

Yeah, you'd have to resort to spawning an actor, and then have some way of keeping it where you want. For example, giving it a really short lifespan and constantly respawning it (think the Shield Gun at Realm667). or just using one actor and using an action function like A_Orbit to have it "stick" to the player in a certain way.

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