0 of 0

File information

Last updated

Original upload

Created by

Solthas

Uploaded by

Solthas

Virus scan

Safe to use

4 comments

  1. sevenfm
    sevenfm
    • member
    • 4 kudos
    Minor issue is that if you press jump while swimming close to the shore, you accelerate not only in water but for some time out of water too which looks weird, maybe add check to stop speed boost if player suddenly gets out of water.
    I wonder if it would be possible to add land sprinting with similar script.

    So I modified the script in the following way:
        onUpdate = function(dt)
          if enabled and doHurt then -- if running this calc
            if types.Actor.isSwimming(self) then -- if in water
              local mf = self.controls.movement
              local ms = self.controls.sideMovement
              if mf ~= 0 or ms ~= 0 then -- if moving
                if dynamic.fatigue(self).current == 0 then -- if out of fatigue
                  hurtTime = hurtTime + dt
                  if hurtTime > hurtWait then -- if enough time has passed
                    ui.showMessage('Swimming while out of fatigue!')
                    dynamic.health(self).current = math.max(0,dynamic.health(self).current - hurtVal) -- don't set to below 0
                    hurtTime = 0
                  end
                end
              end
    elseif  buffTotal > 0 and doBuff == false then
    ui.showMessage('Out of water!')
    spdMod(-1,buffTotal)
    buffTotal = 0
    doBuff = true
            end
          end
        end,

    and now if you leave water while boosting, message is shown and boost is stopped.
    1. Solthas
      Solthas
      • member
      • 50 kudos
      That's a great idea. I'll look to include it soon!
  2. QuinnRed
    QuinnRed
    • member
    • 0 kudos
    INCREDIBLY useful mod!

    Really makes swimming a little more fun. 
    1. Solthas
      Solthas
      • member
      • 50 kudos
      Hey! Thank you! I'm just getting back into modding. Look forward to something "game changing" soon hahaha.