OpenXcom Forum

Modding => Help => Topic started by: B1ackwolf on February 05, 2025, 05:53:12 am

Title: [Help Needed] Dinamic sprites script configuration for explosives and melee
Post by: B1ackwolf on February 05, 2025, 05:53:12 am
Hi everyone, apologies for the long absence. I'm getting back into modding and have a small question regarding Filip H  Ammo script.

With a lot of help from efrenspartano, I managed to implement the changes I wanted for all the gun tiers, but now I’m working on my melee and ordnance sprites, and I need some guidance:

a) I’m looking for a way to make a weapon change its base sprite depending on whether it's held in hand or stashed in the inventory. I tried using foldstock, but I couldn't get it to work.

b) I also need a way to make explosive sprites change based on whether they are primed or not.

I've already created all the necessary artwork, so now it’s just a matter of organizing the index properly. I tried searching on the mod site but didn't have much luck. Hopefully, someone can shed some light on this so I can figure out a solution. Thanks in advance!

attached some samples below
Title: Re: [Help Needed] Dinamic sprites script configuration for explosives and melee
Post by: Yankes on February 05, 2025, 10:33:51 pm
You can check on item if `getSlot` return inventory typ that is `isRightHand` or `isLeftHand`

Prime items you can check `getFuseTimer` if someone prime it.