Table of Contents

Class Ragdoll

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A set of tools to handle the ragdolls more easily.

public class Ragdoll : IWrapper<BasicRagdoll>, IWorldSpace, IPosition, IRotation
Inheritance
Ragdoll
Implements
IWrapper<BasicRagdoll>
Derived
Inherited Members
Extension Methods

Properties

AllowCleanUp

Gets a value indicating whether the clean-up event can be executed.

public bool AllowCleanUp { get; }

Property Value

bool

Base

Gets the PlayerRoles.Ragdolls.BasicRagdoll instance of the ragdoll.

public BasicRagdoll Base { get; }

Property Value

BasicRagdoll

CanBeCleanedUp

Gets or sets a value indicating whether the ragdoll can be cleaned up.

public bool CanBeCleanedUp { get; set; }

Property Value

bool

CreationTime

Gets or sets the time that the ragdoll was spawned.

public DateTime CreationTime { get; set; }

Property Value

DateTime

DamageHandler

Gets or sets the ragdoll's PlayerStatsSystem.DamageHandlerBase.

public DamageHandlerBase DamageHandler { get; set; }

Property Value

DamageHandlerBase

DeathAnimations

Gets all ragdoll's DeathAnimations.DeathAnimation[].

public DeathAnimation[] DeathAnimations { get; }

Property Value

DeathAnimation[]

DeathReason

Gets the ragdoll's death reason.

public string DeathReason { get; }

Property Value

string

ExistenceTime

Gets the ragdoll's existence time.

public float ExistenceTime { get; }

Property Value

float

FreezeTime

Gets or sets the PlayerRoles.Ragdolls.BasicRagdolls clean up time.

public static int FreezeTime { get; set; }

Property Value

int

GameObject

Gets the UnityEngine.GameObject of the ragdoll.

public GameObject GameObject { get; }

Property Value

GameObject

IsConsumed

Gets or sets a value indicating whether this ragdoll has been consumed by an SCP-049-2.

public bool IsConsumed { get; set; }

Property Value

bool

IsExpired

Gets a value indicating whether the ragdoll has expired and SCP-049 is unable to revive it if was not being targets. CanResurrect(Ragdoll)

public bool IsExpired { get; }

Property Value

bool

IsFrozen

Gets a value indicating whether the ragdoll has been already cleaned up.

public bool IsFrozen { get; }

Property Value

bool

List

Gets a IEnumerable<T> of Ragdoll which contains all the Ragdoll instances.

public static IReadOnlyCollection<Ragdoll> List { get; }

Property Value

IReadOnlyCollection<Ragdoll>

Name

Gets the ragdoll's name.

public string Name { get; }

Property Value

string

NetworkInfo

Gets or sets the ragdoll's PlayerRoles.Ragdolls.RagdollData.

public RagdollData NetworkInfo { get; set; }

Property Value

RagdollData

Nickname

Gets or sets the ragdoll's nickname.

public string Nickname { get; set; }

Property Value

string

Owner

Gets or sets the owner Player. Can be null if the ragdoll does not have an owner.

public Player Owner { get; set; }

Property Value

Player

Position

Gets or sets the ragdoll's position.

public Vector3 Position { get; set; }

Property Value

Vector3

Role

Gets or sets the PlayerRoles.RoleTypeId of the ragdoll.

public RoleTypeId Role { get; set; }

Property Value

RoleTypeId

Room

Gets the Room the ragdoll is located in.

public Room Room { get; }

Property Value

Room

Rotation

Gets or sets the ragdoll's rotation.

public Quaternion Rotation { get; set; }

Property Value

Quaternion

Scale

Gets or sets the ragdoll's scale.

public Vector3 Scale { get; set; }

Property Value

Vector3

SpecialRigidbodies

Gets the ragdoll's UnityEngine.Rigidbody[].

public Rigidbody[] SpecialRigidbodies { get; }

Property Value

Rigidbody[]

Transform

Gets the UnityEngine.Transform of the ragdoll.

public Transform Transform { get; }

Property Value

Transform

Zone

Gets the ZoneType the ragdoll is in.

public ZoneType Zone { get; }

Property Value

ZoneType

Methods

CreateAndSpawn(RagdollData)

Creates and spawns a new ragdoll.

public static Ragdoll CreateAndSpawn(RagdollData networkInfo)

Parameters

networkInfo RagdollData

The data associated with the ragdoll.

Returns

Ragdoll

The ragdoll.

CreateAndSpawn(RoleTypeId, string, DamageHandlerBase, Vector3, Quaternion?, Player)

Creates and spawns a new ragdoll.

public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, Vector3 position, Quaternion? rotation = null, Player owner = null)

Parameters

roleType RoleTypeId

The PlayerRoles.RoleTypeId of the ragdoll.

name string

The name of the ragdoll.

damageHandler DamageHandlerBase

The damage handler responsible for the ragdoll's death.

position Vector3

The position of the ragdoll.

rotation Quaternion?

The rotation of the ragdoll.

owner Player

The optional owner of the ragdoll.

Returns

Ragdoll

The ragdoll.

CreateAndSpawn(RoleTypeId, string, string, Vector3, Quaternion?, Player)

Creates and spawns a new ragdoll.

public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, string deathReason, Vector3 position, Quaternion? rotation = null, Player owner = null)

Parameters

roleType RoleTypeId

The PlayerRoles.RoleTypeId of the ragdoll.

name string

The name of the ragdoll.

deathReason string

The reason the ragdoll died.

position Vector3

The position of the ragdoll.

rotation Quaternion?

The rotation of the ragdoll.

owner Player

The optional owner of the ragdoll.

Returns

Ragdoll

The ragdoll.

Destroy()

Destroys the ragdoll.

public void Destroy()

Get(Player)

Gets the IEnumerable<T> of Ragdoll belonging to the Player, if any.

public static IEnumerable<Ragdoll> Get(Player player)

Parameters

player Player

The Player to get.

Returns

IEnumerable<Ragdoll>

A IEnumerable<T> of Ragdoll.

Get(BasicRagdoll)

Gets the Ragdoll belonging to the PlayerRoles.Ragdolls.BasicRagdoll, if any.

public static Ragdoll Get(BasicRagdoll ragdoll)

Parameters

ragdoll BasicRagdoll

The PlayerRoles.Ragdolls.BasicRagdoll to get.

Returns

Ragdoll

A Ragdoll or null if not found.

Get(IEnumerable<Player>)

Gets the IEnumerable<T> of Ragdoll belonging to the IEnumerable<T> of Player, if any.

public static IEnumerable<Ragdoll> Get(IEnumerable<Player> players)

Parameters

players IEnumerable<Player>

The Players to get.

Returns

IEnumerable<Ragdoll>

A IEnumerable<T> of Ragdoll.

GetLast(Player)

Gets the last ragdoll of the player.

public static Ragdoll GetLast(Player player)

Parameters

player Player

The player to get the last ragdoll.

Returns

Ragdoll

The Last Ragdoll.

Spawn()

Spawns the ragdoll.

public void Spawn()

ToString()

Returns the Ragdoll in a human-readable format.

public override string ToString()

Returns

string

A string containing Ragdoll-related data.

TryCreate(RagdollData, out Ragdoll)

Creates a new ragdoll.

public static bool TryCreate(RagdollData networkInfo, out Ragdoll ragdoll)

Parameters

networkInfo RagdollData

The data associated with the ragdoll.

ragdoll Ragdoll

Created ragdoll. Will be null if method retunred false.

Returns

bool

true if ragdoll was successfully created. Otherwise, false.

TryCreate(RoleTypeId, string, DamageHandlerBase, out Ragdoll, Player)

Creates a new ragdoll.

public static bool TryCreate(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, out Ragdoll ragdoll, Player owner = null)

Parameters

roleType RoleTypeId

The PlayerRoles.RoleTypeId of the ragdoll.

name string

The name of the ragdoll.

damageHandler DamageHandlerBase

The damage handler responsible for the ragdoll's death.

ragdoll Ragdoll

Created ragdoll. Will be null if method retunred false.

owner Player

The optional owner of the ragdoll.

Returns

bool

The ragdoll.

TryCreate(RoleTypeId, string, string, out Ragdoll, Player)

Creates a new ragdoll.

public static bool TryCreate(RoleTypeId roleType, string name, string deathReason, out Ragdoll ragdoll, Player owner = null)

Parameters

roleType RoleTypeId

The PlayerRoles.RoleTypeId of the ragdoll.

name string

The name of the ragdoll.

deathReason string

The reason the ragdoll died.

ragdoll Ragdoll

Created ragdoll. Will be null if method retunred false.

owner Player

The optional owner of the ragdoll.

Returns

bool

The ragdoll.

UnSpawn()

Un-spawns the ragdoll.

public void UnSpawn()