Jump to content

Recommended Posts

Hi, I apologize for being so brief, but I am wondering if someone has some advice or code to make a character "friendly" with nightmares, or for that matter, any monstrous group.

 

Any assistance would be greatly appreciated.

 

Thank you.

You can put a prefabPostInit into your modmain, and change the retargeting function...

 

local function retargetfn(inst) --from shadowcreatures.lua
    local entity = FindEntity(inst, TUNING.SHADOWCREATURE_TARGET_DIST, function(guy)
        return
[REPLACE some conditions that match what you want] and inst.components.combat:CanTarget(guy) --replace
    end)
    return entity
end

 

local function ShadowTargetOverride(inst)

   inst.components.combat:SetRetargetFunction(3, retargetfn)

end

 

AddPrefabPostInit("crawlinghorror",ShadowTargetOverride)

AddPrefabPostInit("terrorbeak",ShadowTargetOverride)

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