This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Half-Life: Alyx Workshop Tools/Level Design/Temporary Ragdolls

From Valve Developer Community
Jump to: navigation, search

Introduction

Temporary ragdolls are a feature of Half-Life Alyx. NPCs are able to temporarily enter a ragdolled state and then recover from it either automatically or through an I/O input.

When they come out of the ragdolled state, the game will try and automatically blend them into an animation that will make it look natural for them to get up from their ragdolled position.

This feature is best used on zombies and headcrabs. Combine soldiers should not be made to use a temporary ragdoll as they lack animations for getting up and will teleport to the map origin upon doing so.

Ragdoll and Remain Ragdoll

HLA SDK TempRagdoll RagdollandRemain.png


The "ragdoll and remain ragdoll" option will cause the NPC to spawn in a ragdolled state and remain that way until they receive either the StopTemporaryRagdoll or the StopTemporaryRagdollAndSetEnemy input.

This mode is very useful for spawning zombies in a "sleeping" state and waking them up later by spawning them in this mode and then sending an appropriate input.

StopTemporaryRagdoll will cause the NPC to simply get up from their current position. StopTemporaryRagdollAndSetEnemy will cause the NPC to attempt to face a target when getting up, determined by the input parameter (this would usually be the !activator).

You can cause an already living NPC to go into this state using the BecomeTemporaryRagdoll input.

Ragdoll and Get Up When Settled

HLA SDK TempRagdoll RagdollandGetUp.png


The "ragdoll and get up when settles" option will cause the NPC to spawn in a ragdolled state and get up as soon as their physics settles.

This option is not very useful for NPCs that spawn on map load but can be used to great effect with NPCs spawned through other means such as npc_maker.

For example, setting a zombie to this mode, placing them above a hole and then spawning them in when the player approaches will create the effect of the zombie naturally falling through the hole and then getting up after they land.


Posing

You can use Hammer's physics simulation tool to help with posing NPCs who use this feature, particularly those in Ragdoll and Remain Ragdoll mode.

HLA SDK Physics Sim.png

When in physics simulation mode you can press Start Simulation or press Space to start simulating the NPC's ragdoll from their current position in the editor.

You can also drag the NPC's model in the 3D viewport to influence and somewhat pose the ragdoll into a desired position.

Using the Place Pin button you can pin part of the NPC which will keep them in place in a specific area. This can be very useful when attempting to pose ragdolls.

If you wish to reset the NPC's position back to the default, use the Reset To Bind Pose button.