Skip to content

NodeRef

data class NodeRef(
val scene: String,
val id: Long,
val within: List<Long> = emptyList()
)
Example
fun nodeOf(npc: Npc): NodeRef? = npc.findComponent<NodeScript>()?.node
on_npc_option(Assets.Npc.hans.id, "Talk-to") { player ->
val node = nodeOf(target) ?: return@on_npc_option
player.message("Hans is node ${node.id} of ${node.scene}.")
}
val scene: String
val id: Long
val within: List<Long>
val key: String