Entity

From Blood Wiki
(Difference between revisions)
Jump to: navigation, search
Line 21: Line 21:
 
  health - health of entity
 
  health - health of entity
 
  classname - entity class name
 
  classname - entity class name
 +
th_die - internal game field, a game function to call when monster dies
 
  _ls - q3map2 field, sets scale of lightmaps to be generated for entity surfaces
 
  _ls - q3map2 field, sets scale of lightmaps to be generated for entity surfaces
  

Revision as of 22:24, 22 July 2012

Entity (edict, object) - any object in game world. Players, Monsters, Items etc. are entities.

There is 3 types of game entities, depends on what programs they exists:

  • Game entity
    • Server entity (actual game entity, get saved to savegames)
    • Client entity (networked game entity on a client)
    • Menu entity (exists only in menu program which is a separated from a client because client program get unloaded when level changes)
  • Network entity - legacy engine-based networking (not using client-side progs)
  • Render entity - a Network/Client entity that is sent to render.

Game entity structure

Each game entity have:

  • entity number (index in global entity storage)
  • fields (or keys) - all entity properties.

Entity behavior is set by it's fields.

Example of entity fields:

health - health of entity
classname - entity class name
th_die - internal game field, a game function to call when monster dies
_ls - q3map2 field, sets scale of lightmaps to be generated for entity surfaces

In QuakeC, all entities shares the same fieldset. But on different entity classes, same fields can have different functionality.

Fields classification

  • Common field - field of entity that can be set in level editor (such as origin)
  • Gamecode field - this one is being set by gamecode, not acessible in level editor
  • Non-Saved field - not saved to a savegame filed, this fields always prefixed by _.
  • Compiler-only field - this field dont exist in the game logic and only used by Q3map2 to guide compilation of map.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox