Player::setToRagdoll: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
time1- Time Ped is in ragdoll mode(ms)<br><br>time2- time2 same as time1 but in mircoseconds (us)<br><br>ragdollType-<br>0 : Normal ragdoll<br>1 : Falls with stiff legs/body<br>2 : Narrow leg stumble(may not fall)<br>3 : Wide leg stumble(may not fall)<br><br>p4, p5, p6- No idea<br><br><br>EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1?  more testing needed.  -sob
time1- Time Ped is in ragdoll mode(ms)<br><br>time2- time2 same as time1 but in mircoseconds (us)<br><br>ragdollType-<br>0 : Normal ragdoll<br>1 : Falls with stiff legs/body<br>2 : Narrow leg stumble(may not fall)<br>3 : Wide leg stumble(may not fall)<br><br>p4, p5, p6- No idea<br><br><br>EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1?  more testing needed.  -sob
time2 seems to be 2x time1 - worked in our tests with time1 = 5000 and time2 = 10000 and all booleans as false. - Enorion
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.setToRagdoll(time1, time2, ragdollType, p4, p5, p6);</syntaxhighlight>
<syntaxhighlight lang="javascript">player.setToRagdoll(time1, time2, ragdollType, p4, p5, p6);</syntaxhighlight>
Line 13: Line 14:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
mp.players.local.setToRagdoll(5000, 5000, 0, true, true, true);
-- Sets the player in a ragdoll state for 5 seconds.
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 14:02, 7 November 2020

time1- Time Ped is in ragdoll mode(ms)

time2- time2 same as time1 but in mircoseconds (us)

ragdollType-
0 : Normal ragdoll
1 : Falls with stiff legs/body
2 : Narrow leg stumble(may not fall)
3 : Wide leg stumble(may not fall)

p4, p5, p6- No idea


EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1? more testing needed. -sob time2 seems to be 2x time1 - worked in our tests with time1 = 5000 and time2 = 10000 and all booleans as false. - Enorion

Syntax

player.setToRagdoll(time1, time2, ragdollType, p4, p5, p6);

Required Arguments

  • time1: int
  • time2: int
  • ragdollType: int
  • p4: Boolean
  • p5: Boolean
  • p6: Boolean

Return value

  • Boolean

Example

mp.players.local.setToRagdoll(5000, 5000, 0, true, true, true);
-- Sets the player in a ragdoll state for 5 seconds.

See also