Jump to content

Flashing weapons


rabidrage

Recommended Posts

Alright...my latest holdup...

I've got these awesome upscaled sprites for the weapons, and one of them includes a flashing animation for the Plasma Rifle while it's idle. Is there a way to attack a GLDef to the frame where it lights up? Because currently it matches the brightness of the sector without lighting even itself. I want it to actually flash. What I've tried just doesn't work. Please help!

EDIT 1: Adding A_GunFlash to the frame in question seems to give it the right kind of flash effect, minus lighting up anything in the near vicinity, and it's nullified by getting partial invisibility, which I'm not sure is good or bad. The only other problem is that it seems to make it look like the sprite isn't animated anymore with flashing lights and is just...flashing. Thoughts?

Share this post


Link to post

A_GunFlash executes states after "Flash" label alongside the weapon's current animation. As a "side effect", it also sets the player body's state to a frame where he appears (to other players) as shooting (PLAYF* sprite), and this frame coincidentally has a dynamic light applied on it in OpenGL. It's really not a proper way to light up player's weapons.

A_Light1/A_Light2 slightly illuminate the entire level - that's how weapons flash in vanilla Doom.

I don't have knowledge about GLDefs to help you achieve your goal properly, but as a "dirty" solution, what about spawning a dynamic light actor on the player's position to illuminate him and his gun at the same time? Of course, I mean a custom actor, defined to disappear after a brief moment.

Share this post


Link to post

Well, I was content with A_GunFlash at first because my map/mod is definitely not intended for deathmatching, but then I discovered an example of a custom actor for the purpose in question and decided to follow its example. The flamethrower here: https://www.youtube.com/watch?v=AYSPtckAP2s uses a custom actor, so I was able to reverse engineer it and make my own. Works like a charm.

Off-topic, I don't understand the guy doing the video, but the mod is pretty cool. As much as everyone seems to roll their eyes at Brutal Doom these days, there are some interesting offshoots.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...