Decorate: "Overlay" state

Moderator: GZDoom Developers

Post Reply
bgraybr
Posts: 136
Joined: Tue Nov 30, 2010 7:52 pm

Decorate: "Overlay" state

Post by bgraybr »

Sorry if this doesn't make any sense, I'm having a hard time explaining it

I got this idea when I saw the super shotgun in the Demon Eclipse thread- the animation for the shells is way to fast and there's no easy way to correct it without adding a ton of new sprites..

So anyways, when the flash state is called in a weapon, the sprites called from the flash state are rendered above the rest of the weapon sprites. What I'm asking for is the ability to have another state that's laid over the rest of the sprites and is also called simultaneously so that you can split the weapon into parts and easily have different parts of it animate at different speeds.

Example:

Code: Select all

Actor DESuperShotgun : Weapon {
    States {
        Fire:
            //...code
            DESG D 2 A_OpenShotgun2
            DESG D 0 A_Overlay
            //...code
        Overlay:
            //...animation of shells flying out of the gun...
            DSHL ABCD 9
            //etc. Hope that it makes sense now.
    }
}
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Decorate: "Overlay" state

Post by Xaser »

Hmm, even if the engine won't be able to support more than one overlay state at a time, a generic "A_Overlay(state)" function that works like A_GunFlash minus the player sprite modification would be handy for things like this.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Decorate: "Overlay" state

Post by Gez »

More psprite layers would be useful for many purposes, yeah. (There are several already; not just weapon and flash but also things like Strife's accuracy powerup.)
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Decorate: "Overlay" state

Post by Nash »

It seems that recently there have been more people who are able to work with the ZDoom source, so I thought I'd bump this. It would be great if someone took a look at this.

For my project, the player is able to put on different clothes (and armour), and I'd like the first person HUD sprite to show those clothes/armour as a new layer on top of the player's bare hand sprites.

On top of that, I'd like a separate layer on top of the previous two layers for blood stains - when the player executes a close-quarter melee kill, his clothes/hands should be all stained and bloody.

With current features, I can abuse A_GunFlash for this but I'm still only limited to 2 layers... I need a 3rd layer for the blood stains.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Decorate: "Overlay" state

Post by Xaser »

I'll take a look at it sometime soonish. No guarantees, though, since it's probably much more complex than anything I've tinkered with so far. But it's something I'd like to see as well and I've got a basic idea on where to start (i.e. figure out how to create new psprite layers). Hopefully. :P
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”