RedRock911 Posted May 20, 2015 Share Posted May 20, 2015 OK, Ok, I'm a bit defeated on a project i am working on. Which I've pretty much butchered all the help I recieved earlier. I'm creating a lantern for a mod. And I'm having a bit of an issue with understanding this in the local functions owner.AnimState:OverrideSymbol("swap_object", "swap_item", "swap_item_on") the entire function would look like this example: local function onequip(inst, owner) owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") owner.AnimState:OverrideSymbol("lanternoverlay", "swap_shiplantern", "lanternoverlay") if inst.components.fueled:IsEmpty() then owner.AnimState:OverrideSymbol("swap_object", "swap_lantern", "swap_lantern_off")owner.AnimState:Hide("lanternoverlay") else owner.AnimState:OverrideSymbol("swap_object", "swap_lantern", "swap_lantern_on")owner.AnimState:Show("lanternoverlay") end turnon(inst)end Now i'm guessing this is how a lantern "appears" to be on via overlay. And I am sure there are a ton of ways to do this. But where am I supposed to put this overlay? in a folder? in the bank? in the build? Out of every modded lantern out there, this override symbol call comes up. And a very special thank you to Corrosive, and Saiai for spending so much time on trying to help me figure things like this out! I figure I should give you guys a break and have someone else answer my insane questions, lol. Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/ Share on other sites More sharing options...
Corrosive Posted May 20, 2015 Share Posted May 20, 2015 @RedRock911, I'm on my phone atm so pardon my typos. I feel like I should start off with: But where am I supposed to put this overlay? in a folder? in the bank? in the build? If I answered "yes" to any of those, what exactly would you do? O.o You don't ... really... put things in a bank, per-se. A bank is an "animation bank", which is just a collection of animations. There's lots of animations in the \anim folder of the game. Banks function to collect related animations to group them together. In any case, that code that you pasted (presumably copied from another lantern mod?) is incorrect. It should be "lantern_overlay." I'm not sure if, at present, I could adequately describe to you how it works without causing profound confusion. I'll try when I get back. Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/#findComment-639080 Share on other sites More sharing options...
Mobbstar Posted May 20, 2015 Share Posted May 20, 2015 Well, it's tough. I oughta know (I don't know how though) Basically, one anim needs an placeholder symbol (e.g. player anims have a "swap_object") and the other anim needs to have an symbol that you can reference (e.g. all of those swap_thing anims). I don't know why, but I never managed to get it working. I blame the Steam version of the autocompiler. Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/#findComment-639178 Share on other sites More sharing options...
Corrosive Posted May 20, 2015 Share Posted May 20, 2015 @Mobbstar, You want a copy of the binary unpacker I made so you can peer into the data structure of your compiled anim.bin/build.bin files? It's pure lua so you can even just require or dofile it from within the game. Returns a table with the fully parsed structure of the bin files. Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/#findComment-639254 Share on other sites More sharing options...
RedRock911 Posted May 20, 2015 Author Share Posted May 20, 2015 (edited) Edited-- Edited May 20, 2015 by RedRock911 Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/#findComment-639271 Share on other sites More sharing options...
RedRock911 Posted May 20, 2015 Author Share Posted May 20, 2015 @RedRock911,In any case, that code that you pasted (presumably copied from another lantern mod?) is incorrect. It should be "lantern_overlay." I'm not sure if, at present, I could adequately describe to you how it works without causing profound confusion. I'll try when I get back.Ok, I thought it was an actual image, in the pasted code, it was the name of, what I thought was going to be the image overlay. I really don't understand it. But seems every light mod has some part of the script attached to it.I tried building the lantern another way, without going into detail.....I didn't, lol. Or it didn't work. Which is really based on experience of the modder (me) Link to comment https://forums.kleientertainment.com/forums/topic/54196-explination-of-owneranimstateoverridesymbol/#findComment-639274 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now