on_npc_option
on_npc_option
Section titled “on_npc_option”
fun on_npc_option( npc: Int, option: String, behaviour: Interaction<Npc>.(subject: Entity) -> Unit)Interaction<Npc>.(subject: Entity) -> Uniton_npc_option(Assets.Npc.hans, "Talk-to") { player -> target.speak("Welcome to the castle!") player.message("Hans greets you.")}npc: Intoption
Section titled “option”option: StringProperties
Section titled “Properties”target
Section titled “target”val target: Ton_npc_option
Section titled “on_npc_option”
fun on_npc_option( npc: NpcDefinition, option: String, behaviour: Interaction<Npc>.(subject: Entity) -> Unit)Interaction<Npc>.(subject: Entity) -> Unitnpc: NpcDefinitionoption
Section titled “option”option: StringProperties
Section titled “Properties”target
Section titled “target”val target: T