User Tools

Site Tools


add_character

Add Character


Adds a character to the specified tile within the map (if the tile is not already occupied by another character). The entity ID is optional and will be assigned to the new character if supplied.

Signature:

add_character(model_name, tile_id, entity_id)
ArgumentDescriptionTypeRequired
model_nameModel to use for the new character.StringYes
tile_idID of the tile where the character will be placed.StringYes
entity_idUnique entity ID that will be assigned.StringNo

The Remove Entity function can be triggered later to remove a character that was previously added to the scene with the Add Character function.

Example:

add_character("purple_slime", "dungeon_door_01", "slime_01")

Results: A purple slime will be added to the map on the tile having ID “dungeon_door_01” and will be assigned an ID of “slime_01”.

Use the Add Character function to introduce new NPCs into the scene. After being added, you can use the Set Dialogue function to assign a dialogue to the character or the Set Character Name function to change their name.


Editor Node:

Visual Demo:

add_character.txt · Last modified: 2018/03/16 09:35 by justin