Constructor


ChaserEnemy(actor: any, x: any, y: any, properties: any)

Arguments:

actor: any
x: any
y: any
properties: any




Methods


ChaserEnemy:chaseMovement()

(Override) Responsible for movement of the ChaserEnemy when it has been alerted of a player's presence.
This function can be hooked to add custom chase types.





ChaserEnemy:getGroupedEnemies(include_self: any)

Arguments:

include_self: any

Returns:

1: table




ChaserEnemy:onAdd(parent: any)

Arguments:

parent: any


ChaserEnemy:onAlerted()

(Override) Called whenever the enemy is alerted of the player's presence.
By default, used to cancel any potentially active movement for standard pacetypes.



ChaserEnemy:onCollide(player: any)

Arguments:

player: any


ChaserEnemy:onEncounterEnd(primary: any, encounter: any)

Arguments:

primary: any
encounter: any


ChaserEnemy:onEncounterStart(primary: any, encounter: any)

Arguments:

primary: any
encounter: any


ChaserEnemy:onEncounterTransitionOut(primary: any, encounter: any)

Arguments:

primary: any
encounter: any


ChaserEnemy:paceMovement()

(Override) Responsible for movement of the ChaserEnemy when idle. Only called if pace_type is set.
This function can be hooked to add custom pace types.








Fields


ChaserEnemy.aura: boolean

[Property aura] Whether this enemy will have an aura around it as seen with enemies in Deltarune Chapter 2. Overrides the mod-wide config for enemy auras.


ChaserEnemy.can_chase: boolean

[Property chase] Whether the enemy will chase after players it catches sight of (Defaults to true)


ChaserEnemy.chase_accel: number

[Property chaseaccel] The acceleration of the enemy when chasing the player, in change of pixels per frame at 30FPS, or a multiplier of speed when in multiplier mode.


ChaserEnemy.chase_dist: number

[Property chasedist] The distance, in pixels, that the enemy can see the player from (Defaults to 200)



ChaserEnemy.chase_max: number

[Property chasemax] The maximum speed the enemy will chase the player at, if chase_accel is set (Speed is uncapped if unset)


ChaserEnemy.chase_speed: number

[Property chasespeed] The speed the enemy will chase the player at, in pixels per frame at 30FPS (Defaults to 9)



ChaserEnemy.chase_type: string

[Property chasetype] The name of the chasetype to use. See CHASETYPE for available types.


ChaserEnemy.chasing: boolean

[Property chasing] Whether the enemy is chasing the player when they enter the room. (Defaults to false)


ChaserEnemy.encounter: string

[Property encounter] The encounter ID that will trigger when the player collides with the enemy.



ChaserEnemy.enemy: string

[Property enemy] The actor ID to use for this enemy.



ChaserEnemy.group: string

[Property group] An arbitrary ID that can be be used to group enemies together in a room. When one enemy in a group is defeated, all enemies in the group are defeated as well.



ChaserEnemy.once: boolean

[Property once] Whether this enemy can only be encountered once (Will not respawn when the room reloads) (Defaults to false)



ChaserEnemy.pace_interval: number

[Property paceinterval] The interval between actions when wander pacing (Defaults to 24)


ChaserEnemy.pace_marker: table

[Property list marker] The name of a marker, or a list of markers that the enemy will pace between when wander pacing.


ChaserEnemy.pace_return: boolean

[Property pacereturn] Whether the enemy should return to its spawn point between every point when its pace_type is set to wander or randomwander. (Defaults to true)


ChaserEnemy.pace_speed: number

[Property pacespeed] The speed at which the enemy walks when wander pacing (Defaults to 2)



ChaserEnemy.pace_type: string

[Property pacetype] The type of pacing that the enemy will do while idling. See PACETYPE for available types.


ChaserEnemy.path: string

[Property path] The name of a path shape in the current map that the enemy will follow.


ChaserEnemy.progress: number

[Property progress] The initial progress of the enemy along their path, if defined, as a decimal value between 0 and 1.







ChaserEnemy.speed: number

[Property speed] The speed that the enemy will move along the path specified in path, if defined.


ChaserEnemy.sprite: ActorSprite

[Property actor] Actor to use for this enemy
[Property sprite or animation] Default sprite/animation to set on this enemy


ChaserEnemy.swing_divisor: number

[Property swingdiv] A divisor for the speed of the swing of this enemy when swing pacing (Higher number = slower) (Defaults to 24)


ChaserEnemy.swing_length: number

[Property swinglength] The full length swing covered by this enemy when swing pacing. The enemy placement position is the center of the line (Defaults to 400)





Undocumented