RockstarRaccoon wrote:What are you even using this for? Because what you're talking about basically makes the sprite flash suddenly in and out of existence...
You know, that's a good question. This post is about 2 weeks old, so I'm racking my brain trying to figure out what I was doing 2 weeks ago where I wanted sprites to pop on and off in their animation. Then it finally occurred to me - I was working on weapon HUD sprites. Some weapons will go out of player FOV - for example when reloading or charging certain weapons, or melee weapons being drawn back and/or slashing through FOV and out of FOV. So my weapons have a number of off-screen moments and thus no-draw frames.
Gez wrote:With TEXTURES you can explicitly create null textures. So you could make a null sprite this way. Let's say XMPLZ0 is defined as a null sprite. Then you can have XMPL ABCZDEF 4.
Absolutely right. And now that I think about it, this problem is entirely my own making. I wrote a script to generate weapons for me. First thing it does is figure out all the frames of animation needed for ready, charge, and fire, then draws those frames to png files, and then builds a textures lump to point sprites to them. It's my own code that looks for a no-draw frame (an attempt to draw a png with 0 pixels) and replaces it in the sequence with the TNT1 reference. Instead I should let it define a sprite with the NullTexture flag and then I can use that in the sequence like any other frame.