Set Entity Model


Replaces the specified entity's model with another of the same resource type. The entity's script and properties will be kept (i.e. only the visual appearance will change). The model name is case-sensitive.

Signature:

set_entity_model(entity, model_name)
ArgumentDescriptionTypeRequired
entityEntity that will have its model replaced.EntityYes
model_nameName of the new model resource.StringYes

Example:

set_entity_model(entity["bridge01"], "boards");

Results: Replaces the model of the “bridge01” tile with the “boards” model.

Use the Set Entity Model function as a way to drastically transform the appearance of a character, tile or object, for example a creature that has mutated or evolved.


Editor Node:

Visual Demo: