That's it, thank you.
Oh it is good to know that i am still sane.
Ok. As i asked in a dead topic,
Excuse me, but i can not understand what
Code: [Select]
rules.getSpriteOffsetBigobs sprite_index temp;
doing.
Can you explain please?
(I thinked it is like "auto-adding mod offset when more than one mod is used" but looks like it is not working like that.)
I have done working script. But it stops working when i change mod load order. So i need to catch mod sprite offset.
Described command always gives me "1" in return. I think i do something wrong.
Here is a quote from my version of script:
extended:
RuleItem:
#change sprite from ammo
ALLOW_AMMO_TO_RESPRITE: int
NEW_BIGOB_FOR_WEAPON: int
CURRENT_MOD_OFFSET: RuleList
scripts:
selectItemSprite:
# Select weapon bigSprite based on ammo item
- offset: 1
code: |
var ptr BattleItem ammoItem;
var ptr RuleItem weaponRuleset;
var ptr RuleItem ammoRuleset;
var int doResprite;
var int newSprite;
var int modOffset;
if eq blit_part blit_item_big;
item.getRuleItem weaponRuleset;
weaponRuleset.getTag doResprite Tag.ALLOW_AMMO_TO_RESPRITE;
if eq doResprite 1;
item.getAmmoItem ammoItem;
ammoItem.getRuleItem ammoRuleset;
ammoRuleset.getTag newSprite Tag.NEW_BIGOB_FOR_WEAPON;
if neq newSprite 0;
set sprite_index newSprite;
ammoRuleset.getTag modOffset Tag.CURRENT_MOD_OFFSET;
rules.getSpriteOffsetBigobs sprite_index modOffset;
end;
end;
end;
return sprite_index;
items:
- type: STR_DART_GUN
tags:
ALLOW_AMMO_TO_RESPRITE: 1
- type: STR_DART_CLIP
tags:
NEW_BIGOB_FOR_WEAPON: 1154
CURRENT_MOD_OFFSET: current
Help me please.