Entity Reference

To access the features of Reality Factory (such as lights, sounds, character models, and level exits), entities are placed in the level. This chapter contains descriptions, examples, and usage guidelines for each of the Reality Factory entities.

Using Entity Names

When using certain entities, most notably Triggers and LogicGates, it is necessary that they have a name that can be referred to by other entities. Any entity that requires a name will have an entry called szEntityName. You can enter any name in this field, but be warned that no checking for duplicate names is done. Case is also important - the names Trigger1 and trigger1 are different. If you do not enter any name in this field, Reality Factory uses the name assigned by your level editor - for example, Trigger1, Trigger3, LogicGate4, etc.

Attaching Entities to an Actor, Player, or Model

Many entities can be attached to an actor or world model. When this is done the entity will follow the actor or model if it moves, always staying attached to the original attachment point. There are many reasons you would want to attach an entity to an actor or model. By attaching an effect (or effects) to a StaticEntityProxy moving via a PathFollower, you can have mobile effects. By using a very small actor, only the effects will be seen and this can add atmosphere to a level. You can also attach effects to moving models, and this will jazz up an ordinary activity.

If an entity is able to attach to an actor or model, it will have an EntityName field, a BoneName field, and a Model field in the entity definition. To attach the entity to an actor, enter the name of the entity that has the desired actor in the EntityName field. Currently the only entities that use actors are StaticEntityProxy, Attribute and Pawn. Any other entity name will be ignored. If you want to attach the entity to a specific bone in the actor, enter the bone name in the BoneName field. If no bone name is entered, the actor's root bone location is used.

It is also possible to attach entities to the player: In the EntityName field, enter Player as the name. You can attach to a specific player bone or to the root bone just like any other actor.

To attach an entity to a model, select the Model entry. A list will pop up, showing the currently available models to choose from. The entity will maintain its relative position with regard to the model's rotational center, and will move and rotate with the model.

Note:
If you specify a name in the EntityName entry and a model in the Model entry the EntityName entry is used and the Model entry is ignored.