Class Ragdoll
A set of tools to handle the ragdolls more easily.
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class Ragdoll : IWrapper<BasicRagdoll>, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceAllowCleanUp
Gets a value indicating whether or not the clean up event can be executed.
Declaration
public bool AllowCleanUp { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Base
Gets the PlayerRoles.Ragdolls.BasicRagdoll instance of the ragdoll.
Declaration
public BasicRagdoll Base { get; }
Property Value
Type | Description |
---|---|
PlayerRoles.Ragdolls.BasicRagdoll |
CanBeCleanedUp
Gets or sets a value indicating whether or not the ragdoll can be cleaned up.
Declaration
public bool CanBeCleanedUp { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CreationTime
Gets or sets the time that the ragdoll was spawned.
Declaration
public DateTime CreationTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
DamageHandler
Gets or sets the ragdoll's PlayerStatsSystem.DamageHandlerBase.
Declaration
public DamageHandlerBase DamageHandler { get; set; }
Property Value
Type | Description |
---|---|
PlayerStatsSystem.DamageHandlerBase |
DeathAnimations
Gets all ragdoll's DeathAnimations.DeathAnimation[].
Declaration
public DeathAnimation[] DeathAnimations { get; }
Property Value
Type | Description |
---|---|
DeathAnimations.DeathAnimation[] |
DeathReason
Gets the ragdoll's death reason.
Declaration
public string DeathReason { get; }
Property Value
Type | Description |
---|---|
System.String |
ExistenceTime
Gets the ragdoll's existence time.
Declaration
public float ExistenceTime { get; }
Property Value
Type | Description |
---|---|
System.Single |
FreezeTime
Gets or sets the PlayerRoles.Ragdolls.BasicRagdolls clean up time.
Declaration
public static int FreezeTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
GameObject
Gets the UnityEngine.GameObject of the ragdoll.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
IsConsumed
Gets or sets a value indicating whether or not this ragdoll has been consumed by an SCP-049-2.
Declaration
public bool IsConsumed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsExpired
Gets a value indicating whether or not the ragdoll has expired and SCP-049 is unable to revive it if was not being targets. CanResurrect(Ragdoll)
Declaration
public bool IsExpired { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFrozen
Gets a value indicating whether or not the ragdoll has been already cleaned up.
Declaration
public bool IsFrozen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
List
Gets a System.Collections.Generic.IEnumerable<T> of Ragdoll which contains all the Ragdoll instances.
Declaration
public static IReadOnlyCollection<Ragdoll> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Ragdoll> |
Name
Gets the ragdoll's name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
NetworkInfo
Gets or sets the ragdoll's PlayerRoles.Ragdolls.RagdollData.
Declaration
public RagdollData NetworkInfo { get; set; }
Property Value
Type | Description |
---|---|
PlayerRoles.Ragdolls.RagdollData |
Nickname
Gets or sets the ragdoll's nickname.
Declaration
public string Nickname { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Owner
Gets or sets the owner Player. Can be null if the ragdoll does not have an owner.
Declaration
public Player Owner { get; set; }
Property Value
Type | Description |
---|---|
Player |
Position
Gets or sets the ragdoll's position.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Role
Gets or sets the PlayerRoles.RoleTypeId of the ragdoll.
Declaration
public RoleTypeId Role { get; set; }
Property Value
Type | Description |
---|---|
PlayerRoles.RoleTypeId |
Room
Gets the Room the ragdoll is located in.
Declaration
public Room Room { get; }
Property Value
Type | Description |
---|---|
Room |
Rotation
Gets or sets the ragdoll's rotation.
Declaration
public Quaternion Rotation { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion |
Scale
Gets or sets the ragdoll's scale.
Declaration
public Vector3 Scale { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
SpecialRigidbodies
Gets the ragdoll's UnityEngine.Rigidbody[].
Declaration
public Rigidbody[] SpecialRigidbodies { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Rigidbody[] |
Transform
Gets the UnityEngine.Transform of the ragdoll.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
Zone
Gets the ZoneType the ragdoll is in.
Declaration
public ZoneType Zone { get; }
Property Value
Type | Description |
---|---|
ZoneType |
Methods
| Improve this Doc View SourceCreateAndSpawn(RagdollData)
Creates and spawns a new ragdoll.
Declaration
public static Ragdoll CreateAndSpawn(RagdollData networkInfo)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.Ragdolls.RagdollData | networkInfo | The data associated with the ragdoll. |
Returns
Type | Description |
---|---|
Ragdoll | The ragdoll. |
CreateAndSpawn(RoleTypeId, String, DamageHandlerBase, Vector3, Quaternion, Player)
Creates and spawns a new ragdoll.
Declaration
public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, Vector3 position, Quaternion rotation, Player owner = null)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.RoleTypeId | roleType | The PlayerRoles.RoleTypeId of the ragdoll. |
System.String | name | The name of the ragdoll. |
PlayerStatsSystem.DamageHandlerBase | damageHandler | The damage handler responsible for the ragdoll's death. |
UnityEngine.Vector3 | position | The position of the ragdoll. |
UnityEngine.Quaternion | rotation | The rotation of the ragdoll. |
Player | owner | The optional owner of the ragdoll. |
Returns
Type | Description |
---|---|
Ragdoll | The ragdoll. |
CreateAndSpawn(RoleTypeId, String, String, Vector3, Quaternion, Player)
Creates and spawns a new ragdoll.
Declaration
public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, string deathReason, Vector3 position, Quaternion rotation, Player owner = null)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.RoleTypeId | roleType | The PlayerRoles.RoleTypeId of the ragdoll. |
System.String | name | The name of the ragdoll. |
System.String | deathReason | The reason the ragdoll died. |
UnityEngine.Vector3 | position | The position of the ragdoll. |
UnityEngine.Quaternion | rotation | The rotation of the ragdoll. |
Player | owner | The optional owner of the ragdoll. |
Returns
Type | Description |
---|---|
Ragdoll | The ragdoll. |
Destroy()
Destroys the ragdoll.
Declaration
public void Destroy()
Get(Player)
Declaration
public static IEnumerable<Ragdoll> Get(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to get. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Ragdoll> | A System.Collections.Generic.IEnumerable<T> of Ragdoll. |
Get(BasicRagdoll)
Gets the Ragdoll belonging to the PlayerRoles.Ragdolls.BasicRagdoll, if any.
Declaration
public static Ragdoll Get(BasicRagdoll ragdoll)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.Ragdolls.BasicRagdoll | ragdoll | The PlayerRoles.Ragdolls.BasicRagdoll to get. |
Returns
Type | Description |
---|---|
Ragdoll | A Ragdoll or null if not found. |
Get(IEnumerable<Player>)
Gets the System.Collections.Generic.IEnumerable<T> of Ragdoll belonging to the System.Collections.Generic.IEnumerable<T> of Player, if any.
Declaration
public static IEnumerable<Ragdoll> Get(IEnumerable<Player> players)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Player> | players | The Players to get. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Ragdoll> | A System.Collections.Generic.IEnumerable<T> of Ragdoll. |
GetLast(Player)
Gets the last ragdoll of the player.
Declaration
public static Ragdoll GetLast(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The player to get the last ragdoll. |
Returns
Type | Description |
---|---|
Ragdoll | The Last Ragdoll. |
Spawn()
Spawns the ragdoll.
Declaration
public void Spawn()
ToString()
Returns the Ragdoll in a human-readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing Ragdoll-related data. |
Overrides
TryCreate(RagdollData, out Ragdoll)
Creates a new ragdoll.
Declaration
public static bool TryCreate(RagdollData networkInfo, out Ragdoll ragdoll)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.Ragdolls.RagdollData | networkInfo | The data associated with the ragdoll. |
Ragdoll | ragdoll | Created ragdoll. Will be null if method retunred false. |
Returns
Type | Description |
---|---|
System.Boolean | true if ragdoll was successfully created. Otherwise, false. |
TryCreate(RoleTypeId, String, DamageHandlerBase, out Ragdoll, Player)
Creates a new ragdoll.
Declaration
public static bool TryCreate(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, out Ragdoll ragdoll, Player owner = null)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.RoleTypeId | roleType | The PlayerRoles.RoleTypeId of the ragdoll. |
System.String | name | The name of the ragdoll. |
PlayerStatsSystem.DamageHandlerBase | damageHandler | The damage handler responsible for the ragdoll's death. |
Ragdoll | ragdoll | Created ragdoll. Will be null if method retunred false. |
Player | owner | The optional owner of the ragdoll. |
Returns
Type | Description |
---|---|
System.Boolean | The ragdoll. |
TryCreate(RoleTypeId, String, String, out Ragdoll, Player)
Creates a new ragdoll.
Declaration
public static bool TryCreate(RoleTypeId roleType, string name, string deathReason, out Ragdoll ragdoll, Player owner = null)
Parameters
Type | Name | Description |
---|---|---|
PlayerRoles.RoleTypeId | roleType | The PlayerRoles.RoleTypeId of the ragdoll. |
System.String | name | The name of the ragdoll. |
System.String | deathReason | The reason the ragdoll died. |
Ragdoll | ragdoll | Created ragdoll. Will be null if method retunred false. |
Player | owner | The optional owner of the ragdoll. |
Returns
Type | Description |
---|---|
System.Boolean | The ragdoll. |
UnSpawn()
Un-spawns the ragdoll.
Declaration
public void UnSpawn()