Hey Yankes, I have a question about item ruleset tags in scripts - when I initialize an int variable in a script without setting a value to it, then use getTag on a weapon ruleset to get a value, what does it default to when the weapon is missing that tag? That is, can I check to see if the variable got a tag value with something simple like this?
If neq variableWithTagValue 0
... # continue with rest of script if tag exists on weapon
Edit: Nevermind, I checked it and it works fine like that. Another question though - how do I get the proper mod offset for handobs? There's a function to get the offset for bigobs and floorobs, but not for handobs.
More Edit: Sorry for all the questions, but I ran into another issue with re-selecting the sprites for a weapon handob. Is there a way to check whether or not the weapon is being fired when re-selecting the sprite with selectItemSprite? I'm working on a script that changes the sprite based on loaded ammunition, but when firing a two-handed weapon, the sprite for turning the weapon from the 'held' to the 'firing' position remains in the 'held' position, so it looks like my soldier is firing out the side of the gun.
Even More Edit: Ah, sprite_offset handles all of the handob direction stuff. Got the previous question figured out then, and I used rules.getSpriteOffsetBigobs for the mod offset for handobs - will that have any unintended consequences?