Entities

The "entity" is the basic game object used in WME. The scenes are built of many entities; for example, the background is an entity, the door is an entity etc. The scene entities are created easily using the SceneEdit tool (learn more about SceneEdit).

Other than that, there can be so called standalone entities. Those are used for example to create simple characters (usually non-walking characters, otherwise the actors are used instead).

There is currently no tool for creating the standalone entities. You must create the entity by writing a simple text file, defining the entity's properties.

 

Animations

The entity is represented by an animation (learn more about sprites). Since entities can be used to create simple game characters, they are allowed to talk. Therefore you can also specify one or more talking animations when defining the entity. If you specify more talking animations, they are treated as so called "talk stances". Read more about the talk stances in the Actors chapter.

 

Scripts

The animations described above only define the look of your entity, its "body", so to say. But the actual brain is done by scripting (learn more about scripting). As all the other WME objects, the entity can have one or more scripts assigned, defining its behavior.

 

Entity definition file

OK, we've described what we need to define the entity, now we'll assemble those component into one definition file (the entity files use the .entity extension).

This is an example of an entity definition file:

ENTITY
{
  NAME="MyEntity"
  CAPTION="My brand new entity"
  X=200
  Y=200
  SCALABLE=TRUE
  INTERACTIVE=TRUE
  COLORABLE=TRUE
  SOUND_PANNING=TRUE
  SPRITE="entities\MyEntity\default.sprite"
  TALK="entities\MyEntity\talk.sprite"
  SCRIPT="entities\MyEntity\MyEntity.script"
  FONT = "fonts\outline_white.font"
}

Description:

 

For an example of a complete entity definition file please see the "WME demo" project. There is the "OldGuy" entity prepared in the "entities\OldGuy" folder. Also, you don't need to write the definition file from scratch, there is an entity template available in ProjectMan (learn more about ProjectMan).

 

See also: Entity scripting reference