function init()
   DebugPrint("started")
   man = FindBody("gangsta", true)
   minDist = 1
   midDist = 6
   maxDist = 12
   playerDamage = 0.005
   whisper = LoadSound("MOD/snd/whisperer.ogg")
   weight = 0.055
   --- weight value to dictate how much the man moves towards player
   fallen = 0

end

function tick(dt)
   local a = GetPlayerTransform()
   local b = GetBodyTransform(man)
   local change = 0
   local bias = 0
   for i=1,3 do
      --- check if pos for index i is greater than or less than players
      --- set bias to negative or positive the weight value depending on pos
      if(a.pos[i]<b.pos[i]) then
         bias = -weight
      elseif(a.pos[i]>b.pos[i]) then
         bias = weight
      else
         bias = 0
      end
      --  DebugPrint("Shifting pos: "..i.." by value "..bias)
      --- add weighted bias to the pos at index i
      b.pos[i] = b.pos[i] + bias
   end
   --- sets transform after computing all of the post changes for that frame
   SetBodyTransform(man, b)
   local distToPlayer = VecLength(VecSub(a.pos,b.pos))
   if (distToPlayer < midDist) then
      SetPlayerHealth(GetPlayerHealth()-playerDamage)
      PlaySound(whisper)
   end

end