Jump to content

[Request] Attempting to create character that is friendly with nightmares.


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.

Link to comment
Share on other sites

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)
[REPLACE some conditions that match what you want] and inst.components.combat:CanTarget(guy) --replace
    return entity


local function ShadowTargetOverride(inst)

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





Link to comment
Share on other sites


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