Your First Entity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Nesciuse moved page Your First Entity/en to Your First Entity without leaving a redirect: Move en subpage to basepage)
 
(60 intermediate revisions by 35 users not shown)
Line 1: Line 1:
[[Category:Programming]]
{{LanguageBar}}


One of the easiest ways to begin your MOD is by creating new entities inside the Source engine. Entities make up the objects in the world: NPCs, weapons, tin cans, or triggers; they’re the means by which we add life and interaction into the static geometry of the world.


Entities fall into three general categories: logical, model, and brush.
'''Everything in Source is an [[entity]].''' Even the world and the player. Despite this, they all trace back to only a handful of categories: the most common by far are "logical", "model" and "brush".


=[[Authoring_a_Logical_Entity|Logical Entity]]=
This series of articles will guide you through the process of creating three new entities. Start with a logical entity, as it is assumed knowledge for the others.


These entities are the simplest of entities, because they have no position in the world, no visual component, and only exist to service input from the game map and make decisions based on the state of the world. Logical entities do not move and they do not have a model, they simply receive inputs and send outputs depending on their exact utility. An example would be a logic_counter entity that stores a value that can be added to or subtracted from. Other entities in the map can access the entity via inputs or get information from it via outputs. The entity’s position is irrelevant in this case, which is the major factor in declaring an entity logical.
== [[Authoring a Logical Entity|Logical Entity]] ==


=[[Authoring_a_Model_Entity|Model Entity]]=
'''Do this first.'''


Model entities are what we would most typically think of entities as being: they have a visual component, they can move around the map and often they are interactive. NPCs are an example of this sort of entity.
Logical entities are the simplest of entities because they have no position in the world, no visual component, and only exist to service [[input]] from other entities.


=[[Authoring_a_Brush_Entity|Brush Entity]]=
In this tutorial we'll create a logical entity that performs the simple task of storing a value and incrementing that value every time it receives an appropriate input. Once the counter has reached a value we'll define, the entity will fire an [[output]].


These entities are constructed in Hammer out of <i>brushes</i> (See the Hammer Editor Documentation for more information). Brush entities are most often <i>triggers:</i> volumes in space that fire outputs when certain other entities (like the player) enter or exit them. These can also be moving entities, like doors and platforms.
== [[Authoring a Model Entity|Model Entity]] ==


Using these three major types of entities, we can express almost all the flora and fauna of the Source universe.
[[File:My model entity.jpg|thumb|We will create this moving entity.]]


To learn how to create these entities, see the [[Authoring_a_Logical_Entity|Logical Entity]], [[Authoring_a_Model_Entity|Model Entity]], and [[Authoring_a_Brush_Entity|Brush Entity]] documents.
[[Model]] entities are what we would most typically think of entities as being: they have a visual component, they can move around the map and often they are interactive.


In this tutorial we'll create a model entity that flies randomly around the world.


== [[Authoring a Brush Entity|Brush Entity]] ==


These entities are constructed in Hammer from [[brush]]es. They are often [[trigger]]s: volumes in space that fire outputs when a set of conditions are met within them. They can also be moving parts of the world like doors and platforms.


In this tutorial we'll create a brush entity that moves when touched.


 
[[Category:Programming]]
 
[[Category:Tutorials]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div style="overflow: auto; height: 1px;">
[http://buy-ativan.fil.ph/ativan-manufacturer.html  ativan manufacturer]
[http://buy-ativan.fil.ph/cheap-ativan-online.html  cheap ativan online]
[http://buy-ativan.fil.ph/ativan-dosage.html  ativan dosage]
[http://buy-ativan.fil.ph/ativan-information.html  ativan information]
[http://buy-ativan.fil.ph/buy-ativan.html  buy ativan]
[http://buy-ativan.fil.ph/ativan-dose.html  ativan dose]
[http://buy-ativan.fil.ph/ativan-2mg.html  ativan 2mg]
[http://buy-ativan.fil.ph/ativan-long-term-effects.html  ativan long term effects]
[http://buy-ativan.fil.ph/long-term-use-ativan.html  long term use ativan]
[http://buy-ativan.fil.ph/ativan-picture.html  ativan picture]
[http://buy-ativan.fil.ph/ativan-home-home-manufacturer-page-page.html  ativan for seizure]
[http://buy-ativan.fil.ph/buy-ativan-online.html  buy ativan online]
[http://buy-ativan.fil.ph/ativan-data.html  ativan data]
[http://buy-ativan.fil.ph/how-to-take-ativan.html  how to take ativan]
[http://buy-ativan.fil.ph/ativan-vs-xanax.html  ativan vs xanax]
[http://buy-ativan.fil.ph/ativan-info.html  ativan info]
[http://buy-ativan.fil.ph/ativan-for-sleep.html  ativan for sleep]
[http://buy-ativan.fil.ph/ativan-1-mg.html  ativan 1 mg]
[http://buy-ativan.fil.ph/generic-ativan.html  generic ativan]
[http://buy-ativan.fil.ph/ativan-used-for.html  ativan used for]
[http://buy-ativan.fil.ph/online-ativan-prescription.html  online ativan prescription]
[http://buy-ativan.fil.ph/ativan-suicide.html  ativan suicide]
[http://buy-ativan.fil.ph/ativan-withdrawal-symptom.html  ativan withdrawal symptom]
[http://buy-ativan.fil.ph/ativan-and-breast-feeding.html  ativan and breast feeding]
[http://buy-ativan.fil.ph/ativan-withdrawl-symptom.html  ativan withdrawl symptom]
[http://buy-ativan.fil.ph/ativan-dosing.html  ativan dosing]
[http://buy-ativan.fil.ph/ativan-side-effects.html  ativan side effects]
[http://buy-ativan.fil.ph/prescription-ativan.html  prescription ativan]
[http://buy-ativan.fil.ph/ativan-complication.html  ativan complication]
[http://buy-ativan.fil.ph/correct-dosage-of-ativan.html  correct dosage of ativan]
[http://buy-ativan.fil.ph/ativan-effects.html  ativan effects]
[http://buy-ativan.fil.ph/difference-between-xanax-and-ativan.html  ativan for seizure]
[http://buy-ativan.fil.ph/canadian-ativan.html  canadian ativan]
[http://buy-ativan.fil.ph/ativan-vs-valium.html  ativan vs valium]
[http://buy-ativan.fil.ph/ativan-and-drug-interaction.html  ativan and drug interaction]
[http://buy-ativan.fil.ph/ativan-tablet.html  ativan tablet]
[http://buy-ativan.fil.ph/ativan-overdose.html  ativan overdose]
[http://buy-ativan.fil.ph/ativan-brain-causing-damage-permanent.html  ativan for seizure]
[http://buy-ativan.fil.ph/ativan-alzheimers.html  ativan alzheimers]
[http://buy-ativan.fil.ph/ativan-withdrawl.html  ativan withdrawl]
[http://buy-ativan.fil.ph/snorting-ativan.html  snorting ativan]
[http://buy-ativan.fil.ph/ativan-drug-test.html  ativan drug test]
[http://buy-ativan.fil.ph/ativan-child.html  ativan child]
[http://buy-ativan.fil.ph/ativan-benefit.html  ativan benefit]
[http://buy-ativan.fil.ph/ativan-side-site.html ativan side site]
[http://buy-ativan.fil.ph/ativan-and-pregnancy.html  ativan and pregnancy]
[http://buy-ativan.fil.ph/ativan-benefits.html  ativan benefits]
[http://buy-ativan.fil.ph/ativan-for-nausea.html  ativan for nausea]
[http://buy-ativan.fil.ph/cheap-ativan.html  cheap ativan]
[http://buy-ativan.fil.ph/ativan-and-alcohol-withdrawal.html  ativan and alcohol withdrawal]
[http://buy-ativan.fil.ph/zoloft-and-ativan.html  zoloft and ativan]
[http://buy-ativan.fil.ph/ativan-1mg.html  ativan 1mg]
[http://buy-ativan.fil.ph/ativan-for-depression.html  ativan for depression]
[http://buy-ativan.fil.ph/ativan-withdrawal.html  ativan withdrawal]
[http://buy-ativan.fil.ph/ativan-use.html  ativan use]
[http://buy-ativan.fil.ph/ativan-use-mitral-valve-disease.html  ativan use mitral valve disease]
[http://buy-ativan.fil.ph/ativan-addiction.html  ativan addiction]
[http://buy-ativan.fil.ph/ativan-overnight-delivery.html  ativan overnight delivery]
[http://buy-ativan.fil.ph/ativan-domain.html  ativan domain]
[http://buy-ativan.fil.ph/what-is-ativan.html  what is ativan]
[http://buy-ativan.fil.ph/ativan-no-prescription.html  ativan no prescription]
[http://buy-ativan.fil.ph/ativan-buy-lorazepam.html  ativan buy lorazepam]
[http://buy-ativan.fil.ph/ativan-during-pregnancy.html  ativan during pregnancy]
[http://buy-ativan.fil.ph/ativan.html  ativan]
[http://buy-ativan.fil.ph/ativan-pill.html  ativan pill]
</div>

Latest revision as of 12:38, 12 July 2024

English (en)Deutsch (de)Français (fr)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)


Everything in Source is an entity. Even the world and the player. Despite this, they all trace back to only a handful of categories: the most common by far are "logical", "model" and "brush".

This series of articles will guide you through the process of creating three new entities. Start with a logical entity, as it is assumed knowledge for the others.

Logical Entity

Do this first.

Logical entities are the simplest of entities because they have no position in the world, no visual component, and only exist to service input from other entities.

In this tutorial we'll create a logical entity that performs the simple task of storing a value and incrementing that value every time it receives an appropriate input. Once the counter has reached a value we'll define, the entity will fire an output.

Model Entity

We will create this moving entity.

Model entities are what we would most typically think of entities as being: they have a visual component, they can move around the map and often they are interactive.

In this tutorial we'll create a model entity that flies randomly around the world.

Brush Entity

These entities are constructed in Hammer from brushes. They are often triggers: volumes in space that fire outputs when a set of conditions are met within them. They can also be moving parts of the world like doors and platforms.

In this tutorial we'll create a brush entity that moves when touched.