Class Monster
- Namespace
- SharpPluginLoader.Core.Entities
- Assembly
- SharpPluginLoader.Core.dll
public class Monster : Entity
- Inheritance
-
Monster
- Inherited Members
Constructors
Monster()
Constructs a new Monster from a nullptr
public Monster()
Monster(nint)
Constructs a new Monster from a native pointer
public Monster(nint instance)
Parameters
instance
nintThe native pointer
Properties
AiData
The AI data of the monster
public nint AiData { get; }
Property Value
DespawnTime
The despawn time of the monster (in seconds)
public ref float DespawnTime { get; }
Property Value
DifficultyIndex
The index of the monster in the difficulty table (dtt_dif)
public ref uint DifficultyIndex { get; }
Property Value
Health
The current health of the monster
public ref float Health { get; }
Property Value
MaxHealth
The maximum health of the monster
public ref float MaxHealth { get; }
Property Value
Name
The name of the monster
public string Name { get; }
Property Value
SingletonInstance
The sEnemy singleton instance
public static MtObject SingletonInstance { get; }
Property Value
Speed
The speed of the monster (1.0 is normal speed)
public ref float Speed { get; }
Property Value
Type
The id of the monster
public MonsterType Type { get; }
Property Value
Variant
The variant (sub id) of the monster
public uint Variant { get; }
Property Value
Methods
CreateShell(uint, Vector3, Vector3?)
Spawns a shell on the entity
public override void CreateShell(uint index, Vector3 target, Vector3? origin = null)
Parameters
index
uintThe index of the shell in the entities shell list (shll)
target
Vector3The position the shell should travel towards
origin
Vector3?The origin of the shell (or null for the entity itself)
DisableSpeedReset()
Disables the periodic speed reset that the game does
public static void DisableSpeedReset()
Remarks
Call this before changing the Speed property on a monster. This setting applies globally
EnableSpeedReset()
Reenables the periodic speed reset that the game does
public static void EnableSpeedReset()
Enrage()
Tries to enrage the monster
public bool Enrage()
Returns
ForceAction(int)
Forces the monster to do a given action. This will interrupt the current action.
public void ForceAction(int id)
Parameters
id
intThe id of the action to execute
GetAllMonsters()
Gets a list of all monsters in the game
public static Monster[] GetAllMonsters()
Returns
- Monster[]
SetTarget(nint)
Sets the monster's target
public void SetTarget(nint target)
Parameters
target
nint
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ToString(MonsterType)
Gets the human readable name of the given monster id
public static string ToString(MonsterType type)
Parameters
type
MonsterTypeThe monster id
Returns
- string
The human readable name of the monster
Remarks
This is equivalent to the Name property on a monster with this type
Unenrage()
Unenrages the monster
public void Unenrage()