Jump to content

Recommended Posts

Hello again! So, There's this concept I'd like to use for my modded character. You see, he's kind of a tank, which is great and all, but it doesn't help much unless he draws aggro more than other characters. What I'd like is for him to copy Wes' hound target component but with all hostile mobs, so that he is often targeted instead of other players! Alternatively, if there was a way for him to steal the aggro off of other players, that would work, too! something like Wigfrid's taunt, but without an item to activate it? Maybe it automatically happens when he attacks something, or if he emotes?  Could someone please help me out?

Link to comment
https://forums.kleientertainment.com/forums/topic/138413-drawing-aggro/
Share on other sites

here's the code for wigfrid's taunt.

battlesong_instant_taunt =
    {
        ONINSTANT = function(singer, target)
            if not target:HasTag("bird") and target.components.combat then
                target.components.combat:SetTarget(singer)
                AddEnemyDebuffFx("battlesong_instant_taunt_fx", target)
            end
        end,

        INSTANT = true,
        DELTA = TUNING.BATTLESONG_INSTANT_COST,
        ATTACH_FX = "battlesong_instant_taunt_fx",
        SOUND = "dontstarve_DLC001/characters/wathgrithr/quote/taunt",
    },

 

as you can see it's actually pretty small, making it a useable item is actually the complicated part. the relevant bit is this: target.components.combat:SetTarget(singer).

singer here, referring to Wigfrid.

I've never made a character before, so I'm not quite sure how precisely to implement it, but this should be a good place to start.

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