Skip to content

Npc

class Npc : Entity()
Example
on_npc_option(Assets.Npc.hans.id, "Talk-to") { player ->
val hans: Npc = target
hans.speak("Hello, adventurer!")
if (hans.shardId != player.shardId) player.message("Hans is in another shard?")
}
fun create(
id: Int,
tile: Tile3,
owner: Entity? = null,
respawnDelay: Int? = null,
madeAs: Int? = null,
facing: Direction? = null
): Npc