Jump to content

Recommended Posts

Hello,
I have been working on a custom structure that is based on the flingomatic, but instead waters farm soil around itself on a timer. I used the flingo as base, both from a code and an asset perspective. I have implemented the needed functions, it works, I made the modified animations too. Aside from some fine tuning there is one glaring issue, which I cannot seem to figure out:

The fuel meter is missing when I use my own animations.

The animation bank is set to the flingomatic(firefighter) while the build is set to my custom build (autohose). I added the custom states to the stategraph (which replace the animations) and I am calling those in my prefab.

Anyone has any idea how the fuel meter is added onto the flingomatic? I found some functions in prefabskin.lua related to it but i cannot solve this one. I am using the original flingomatic meter zip and I call that one in the script too. If I run it with the original animations the meter shows up, but it does not on the custom animations. Which makes me think it is somehow tied to the animations.

Attached the mod folder.

Any ideas?

Thanks,
Mark

Auto Hose 2.7z

In case anyone runs into this in the future - I found an alternative solution based on how Winona's generators are set up.

I added a sprite to the animations for each fuel level (each except the one the structure spawns with are hidden). When the fuel change is called, I put an ' if ' statement structure to decide which sprite should be used, then I change the sprite like this:
 

inst.AnimState:OverrideSymbol("[base sprite the item spawns with]", "[your build]", "[new sprite name]")

example:

inst.AnimState:OverrideSymbol("m10", "autohose", "m1")

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...