Jump to content

Recommended Posts

Okay, so I'm trying to make a battlefield scavenger-like character, and have it so mobs won't aggro onto him. This is the code I have in modmain.lua so far:

-- wulchur is the character name

local function PassiveUntilAttack(wulchur)
    if wulchur.inst:HasTag("shadow") then
        return
    end
    local _SetRetargetFunction = wulchur.SetRetargetFunction
    wulchur.SetRetargetFunction = function(wulchur, period, fn)
        if fn then
            local _fn = fn
            fn = function(...)
                local _target = _fn(...)
                if _target and _target.prefab == "wulchur" then
                    return
                end
                return _target
            end
        end
        return _SetRetargetFunction(wulchur, period, fn)
    end
end

Every time I try to run it, I get:

[00:02:48]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:49]: CurlRequestManager::ClientThread::Main() complete
[00:02:49]: HttpClient2 discarded 0 callbacks.
[00:02:49]: /Users/buildbot/buildslave/sdr_public_osx/build/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (88) : Assertion Failed: SteamDatagramTransportLock held for 250.9ms!
[00:02:49]: Shutting down

 

What needs to be fixed?

 

EDIT: Oh ya, and he's in a multi character mod pack. Might make a difference.

Edited by Tigger_Fan_
Link to comment
https://forums.kleientertainment.com/forums/topic/96619-no-aggro-error-code/
Share on other sites

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