I have a gun in a mod I'm making and would like it if as long as the fire button is held down, it changes to a sprite where it is "Open". Is there a way to do this?
Yes... I think so. I've never tried it before. You're going to want to look at \ items \ guns \ test \ bow.gun \ items \ guns \ test \ bowfull.png \ items \ guns \ test \ bowfull.frames \ leveling \ bow.functions I believe you could possibly do this one of two ways. You could do it the way the bow does it and reference and "imageFrameSelector" in another location - a .functions file you create............... or you could try using it in-line. Like so: Code: "imageFrameSelector" : [ "linear", "clamp", [0, 0], [1.0, 4.9], [1.1, 3.9], [1.2, 3.9] ] No idea if that would work. If it doesn't, just make the .function file like the bow does, no big deal. Here. Phlosioneer wrote this out awhile back. I don't know if it works or not since I've never tried it and no one ever posted in the thread to comment on it working or not working. It's a tiny bit outdated now, since functions file is simply named .function as opposed to .lvlfunction and whatnot, but that's okay.
Look at my chickengun mod. It has a single alternate frame of animation for when the button is held down. It makes the chicken open its beak and raise its wing.