Player NPC

From Cubic Castles Wiki
Revision as of 17:56, 4 December 2023 by ThePencilWielder (talk | contribs) (Created page with "Player NPCs can be purchased from the Cubit Store for File:Cubit.png 1,000. They are interactable Mannequins that can be coded to talk to players and or give them...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Player NPCs can be purchased from the Cubit Store for Cubit.png 1,000. They are interactable Mannequins that can be coded to talk to players and or give them Temporary Items. Upon walking up to a Player NPC that you have placed, three options will appear. These options are Dress Up, Talk, and Code. Selecting Dress Up will allow you to add clothes to your NPC, similar to Mannequins. Selecting Talk will trigger the NPC to read the first script and follow it's instructions. Selecting Code will open the panel of scripts to be edited.

NPC Coding

First, selecting Code will open a panel where you can add, delete, or rename scripts. An NPC will have two scripts coded by default that demonstrates how to create a basic piece of dialogue. To begin coding, select the first script, or delete the two scripts and create a new one. Then select Edit to begin editing your script.

Commands

Selecting Add Command will give you a list of commands that can be added to your script. Note that you cannot have more than ten commands in a single script.

Start Chat

This command must be in the script in order to create dialogue. Say and Reply commands will not work if there is no Start Chat command in the script. By itself, this command does nothing. The Start Chat command can be placed anywhere in the script to function.

Say

The Say command will allow the NPC to talk to the player interacting with it. The NPC will say whatever is typed into the Say command. Adding more Say commands in a row will make the dialogue last longer and will require the player to click/press to continue to the next box of dialogue. A Reply command must be placed anywhere below a Say command for the dialogue to work. A Start Chat command must be anywhere in the script for the dialogue to work. Normally, your Say commands will be at the top of your script to avoid issues with other commands.

(still a work in progress)