Garry's Mod

Garry's Mod

JOJO's BIZARRE ABILITIES
Stand Movement
I was messing with the mod, using AI since I don't know how to code, and I managed to get the Stand ability to drift slowly alongside the player

Under function ENT:FindPos() in ba_stand_rewritten, I went under

elseif standuser:IsStandSummoned() and !self.FarAway and !self.InAttack then

and replaced the content under it with

if SERVER then
self:SetAngles(Angle(0, ang.yaw, 0))

local desiredPos = pos + (standuser:GetForward() * -16) + (standuser:GetRight() * -14) - Vector(0, 0, -8)
local currentPos = self:GetPos()
local distanceSqr = currentPos:DistToSqr(desiredPos)
local maxDistance = 150 -- You can tweak this value for how far it’s allowed to trail

if distanceSqr > maxDistance * maxDistance then
-- Snap if too far away
self:SetPos(desiredPos)
else
-- Dynamic trailing speed based on distance
local distance = math.sqrt(distanceSqr)
local lerpSpeed = math.Clamp(distance * 0.15, 5, 25)
local lerpedPos = LerpVector(FrameTime() * lerpSpeed, currentPos, desiredPos)

self:SetPos(lerpedPos)
end
end
It was shorter but I had the AI write code to make the Stand drift faster if it lags too far behind, it was an issue at first since the player can move 'really' fast
I've been playing with it for a bit and it's actually really satisfying, I'll leave it for you to judge though
< >
Showing 1-2 of 2 comments
jopster1336  [developer] 12 Aug @ 6:29pm 
just noticed this, glad you still use this mod, addy!
addy2845 12 Aug @ 10:45pm 
Oh yeah lmao, I got super nostalgic so I started messing around with it for a while, I still have my personal copy of it
Still a great mod
< >
Showing 1-2 of 2 comments
Per page: 1530 50