-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event to make a ragdolled ped get up again (unragdoll) #2290
Comments
Sounds like a feature request not a issue ¯_(ツ)_/¯ |
I believe you can use |
That does not work. |
I think clever use of SetPedToRagdoll(PlayerPedId(), 100, 200, 0, false, false, false)
while SomeCondition do
Wait(0)
ResetPedRagdollTimer(PlayerPedId())
end |
ResetPedRagdollTimer does not do anything. It does not stop the last ragdoll timer, the player still gets up after the time configured in SetPedToRagdoll in my tests. |
Can you provide an example as to how you are running/testing this? |
SetPedToRagdoll(ped, 1000, 1000, 0, false, false, false) in a 0 wait loop, as otherwise it just does not work. Any value above 10~ seconds also seems to be ignored. I also found out, that SetPedToRagdoll has instances, in which other players do see the player as standing. |
Using local timeToRagdoll = 10000
local ped = PlayerPedId()
local ragdoll = true
SetPedToRagdoll(ped, 10, 10, 0, false, false, false)
CreateThread(function()
while ragdoll do
Wait(0)
ResetPedRagdollTimer(ped)
end
end)
Wait(timeToRagdoll)
ragdoll = false works perfectly fine for me and achieves exactly what you're asking for.
|
Ah I totally misunerstood the function, it now makes much more sense. Thanks for clarifying that! |
I tried using it. |
FiveM_cl2_b2944_GTAProcess_gjbQrQtf5V.mp4It shows this to other players. |
Works perfectly fine for me. However, if you're trying to reset the ragdoll timer on a remotely owned ped this won't work for obv reasons. This only works on the local player ped or peds the client has network ownership of (working around this limitation in code should be easy though, e.g. network events/state bags/...). 2024-03-04.12-01-11.mp4 |
As soon as you hit the ped, it begins twitching and trying to get up, if you dont run EnableBoundAnkles (or whatever). |
Also the networking is completely broken for ragdolls. |
That isn't a bug, physics for peds are completely client sided so where they rag-doll will be different for every client. |
The position of the ped is still corrected for a certain period of time. It just stops after some time. |
NetworkCreateSynchronisedScene needs the player to be not ragdolled to be executed properly. |
There currently does not seem to be any functionality to either ragdoll someone properly without them getting up again automatically after some time (SetPedToRagdoll) or get up from being ragdolled at all!
There is just one variable for time in SetPedToRagdoll THAT can't be reset, even though I was thinking, ResetPedRagdollTimer would do that.
SetPedToRagdoll also twitches the ragdoll, every time, it is applied again.
Calling ClearPedTasks does nothing on a ragdolled player, ClearPedTasksImmediately t-poses the player for a bit and the returns to the base idle animation. (No get up animation whatsoever here)
I would suggest exposing more natives regarding ragdolling or giving some type of way to unragdoll a player atleast.
The text was updated successfully, but these errors were encountered: