Jump to content

No Aggro error code


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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...