Jump to content

Recommended Posts

Hey, sorry, new to this. I've been pulling my hair out trying to figure out how I can override Winona's remote cast state. This is where I'm at:

AddStategraphPostInit("wilson", function(sg)
    local _cast = sg.states["crushitemcast"]
    local _attack = sg.states["attack"]
    print("MODDING - Found action")  
    _cast.onenter = function(inst,...)
        print("MODDING - sg:crushitemcast")
        return
    end
    _attack.onenter = function(inst,...)
        print("MODDING - sg:attack")
        return
    end
end)

AddStategraphPostInit("wilson_client", function(sg)
    local _cast = sg.states["crushitemcast"]
    local _attack = sg.states["attack"]
    print("MODDING - Found action for client")  
    _cast.onenter = function(inst,...)
        print("MODDING - sg:crushitemcast (client)")
        return
    end
    _attack.onenter = function(inst,...)
        print("MODDING - sg:attack (client)")
        return
    end
end)

This logic is working fine for the attack state, but isn't working at all for the crushitemcast state. I see the logic in SGWilson.lua where the casting animation is triggered, so why am I unable to override it??

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...