Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
I'm trying to replace the stimpack's graphic with a custom animated sprite. In-game, the first loop displays correctly; but after the first loop, instead of replaying the animation, the sprite simply disappears. The item is still there and can be picked up, but it's invisible.
class SmallLE : HealthBonus replaces HealthBonus
Inventory.PickupMessage "Small Life Energy (+1 Health)";
BON1 ABCB 1;
My wild guess it has something to do with the fact that the default health bonus sprite is already animated (as opposed to the static stimpack sprite), but I still don't know exactly what's causing the issue.
Thanks in advance.
Last edited by DuoDynamo2 on Fri Dec 09, 2022 2:53 pm, edited 1 time in total.
You haven't set up the proper offsets for your STIM sprites. You need to use a tool such as SLADE or grabpng to edit the sprite files and assign the offsets.
The weird thing here is that you can see the sprite at all, even if only for a few ticks. Might be a bug, or one of those quirks of the GZDoom engine that were left in to avoid breaking existing mods that rely on them.
*facepalm* Duh, of course. It was the offset.
I'm using SLADE, but I keep forgetting about the offset. Normally when I get an invisible sprite I remember about it straight away, but I guess I was thrown off this time because of the first frames showing up. Made me think it was something else.
I adjusted the offset and now it's working as intended. Thank you very much for the help!