how to make player sit on the ground

I haven’t tried it cause I don’t really know what to look for.

I want to know how to make a player do the sit animation. i think the enum is ACT_HL2MP_SIT_SLAM < – not sure if that is correct.

so I guess what I am asking for is some info on how to accomplish this.

thanks .

here’s this one

ok the ACT_HL2MP_SIT_SLAM is what I want the player to do but how ?

[editline]20th October 2013[/editline]

ok so i made an entity and the DoAnimationEvent

function ENT:Use( activator, caller )
if ( activator:IsPlayer() ) then
activator:DoAnimationEvent( ACT_HL2MP_SIT_SLAM )
end [/lua]

and it will only show for a split second. is there a way to keep it idle after the animation is set??

try using SetAnimation( ACT_HL2MP_SIT_SLAM ) instead.

that did nothing :frowning:

function ENT:Use()
        self.Owner::SetAnimation( ACT_HL2MP_SIT_SLAM )

might have to fidget around with that, but that should work.

I tested it already and it does not work also it’s [lua]self.Owner:SetAnimation() [/lua]

and why 2 [lua]end[/lua] when only one is needed ?

[lua]function ENT:Use(activator)
if IsValid(activator) and activator:IsPlayer() then
activator:SetAnimation( ACT_BUSY_SIT_GROUND )

It still dose not set the animation

Works fine here, how are you checking?

with the camera tool


You have to do this with GM:CalcMainActivity and GM:UpdateAnimation

what is and how do you use GM:UpdateAnimation??

I’ve always used ResetSequence()

local sequence = ent:LookupSequence("Run")

I’ve had small issues with all of the other methods.

ACT_BUSY_SIT_GROUND puts me in T pose , is there a way to get to work ??

Set your model to a ragdoll with that animation.

you mean my playermodel??

[editline]22nd October 2013[/editline]

so then how do I set my playermodel to a ragdoll

You use, “Entity:SetModel(“ragdollpath”)”, so you can use the animation on that model.

alright I did this

concommand.Add( “workplease”, function( ply )
ply:SetAnimation( ACT_BUSY_SIT_GROUND )

and it just set me to T-pos again