Jump to content

Recommended Posts

I've searched around in the DST Hamlet character mod to find anything about the dodge. I've found something, I've copied it into my .lua file, but it didn't do anything in-game.

Spoiler

local common_postinit = function(inst) 
    -- Minimap icon
    inst.MiniMapEntity:SetIcon( "spinel.tex" )
    
    inst.dodgetime = net_bool(inst.GUID, "player.dodgetime", "dodgetimedirty")
    inst.regorged = true
    
    inst:ListenForEvent("dodgetimedirty", function()
        inst.last_dodge_time = GetTime()
    end)
    
    inst.last_dodge_time = GetTime()
end

and

Spoiler

local function GetPointSpecialActions(inst, pos, useitem, right)
    if right and GetTime() - inst.last_dodge_time > inst.dodge_cooldown then
        local rider = inst.replica.rider
        if rider == nil or not rider:IsRiding() then
            return { ACTIONS.DODGE }
        end
    end
    return {}
end

Here's Wheeler's and my character's .lua file:

spinel.lua wheeler.lua

Edited by BillTheCipher

I won't personally help you with this but i'd say ask the owner "Hornet" for permission as you are gonna use and publish this, No?

I'll give you two hints on making it work, first of all you need to have the animations that wheeler has, as this they are unique to the character. Second of all you are calling on an action that isn't actually present in the character as you have not introduced them into the game yet.

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