OpenXcom Forum

Modding => OXCE Support => OpenXcom Extended => OXCE Support Y-scripts => Topic started by: Osobist on May 08, 2023, 03:22:21 pm

Title: [Suggestion] add possibility to dynamically change skilliconSprite
Post by: Osobist on May 08, 2023, 03:22:21 pm
Hello. Can we have a feature to dynamically change skillIconSprite depending on tags, which are tied to current BattleUnit? One of the possible usages that we're currently working on right now is the indicator of taken aiming mode.
Title: Re: [Suggestion] add possibility to dynamically change skilliconSprite
Post by: Yankes on May 08, 2023, 03:59:27 pm
Some thing like this could be added.
But what exactly is use case you want have? When you expect this icon to change?
Title: Re: [Suggestion] add possibility to dynamically change skilliconSprite
Post by: Osobist on May 08, 2023, 05:07:56 pm
The icon's sprite should be calculated at each frame just like selectUnitSprite and selectItemSprite does. Tag's changing on unit comes as trigger to it. The tag change itself happens in skillUseUnit event. Simply talking: unit used skill - the skill icon changed at the same time. Used other skill in same turn - changed again. All goes in realtime.