Jump to content

Animations vs Overlays?


Recommended Posts

I've basically finished modding a character and am getting the visuals ready, but one animation I need is a swimming texture.  I've already coded it so the character swaps to a different set of animations entirely when swimming, but someone pointed out to me that I could have just swapped to a different animation where the legs appear to be underwater.  Does anyone know if this is a simple edit?  I've only just begun looking into this.  This person also causes ripple effects to appear around the player when in the water, whereas I was going to have to animate that into the skin..

The other mod in question:  https://steamcommunity.com/sharedfiles/filedetails/?id=2358978811

This doesn't look too difficult to code, I'm just a little unsure how something like this is incorporated.

local function AddRipple(inst)
    if OnWater(inst) and GLOBAL.TheWorld.ismastersim then
        local wake = GLOBAL.SpawnPrefab("wake_small")
        local rotation = inst.Transform:GetRotation()

        local theta = rotation * GLOBAL.DEGREES
        local offset = GLOBAL.Vector3(math.cos( theta ), 0, -math.sin( theta ))
        local pos = GLOBAL.Vector3(inst.Transform:GetWorldPosition()) + offset
        wake.Transform:SetPosition(pos.x,pos.y + TUNING.GURA_OFFSET,pos.z)
        wake.Transform:SetScale(1.2,1.2,1.2)

        wake.Transform:SetRotation(rotation - 90)
        inst.SoundEmitter:PlaySound("turnoftides/common/together/water/splash/jump_small",nil,.25)
    end
end

 

furryeskimo.lua gura_swim.lua

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...