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)
 
(22 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[http://rumour.servemp3.com/blog/eastern-connecticut.html eastern connecticut state college] [http://weigh.servemp3.com/library/allopurinol.html allopurinol] [http://weigh.servemp3.com/library/fotos-de-anais.html fotos de anais martinez desnuda] [http://shrewd.servemp3.com/web/atropine.htm atropine] [http://baffle.servemp3.com/blog/download-mp3-song.html download mp3 song] [http://jeshu.servemp3.com/laser-treatment.htm laser treatment] [http://shrewd.servemp3.com/web/free-videos.htm free videos] [http://baffle.servemp3.com/blog/black-man-dating.html black man dating white woman] [http://while.servemp3.com/resources/3d-sex.html 3d sex] [http://rumour.servemp3.com/blog/retin.html retin] [http://incite.servemp3.com/q/ontario-airport.html ontario airport parking] [http://capdv.servemp3.com/ebony-gallery.html ebony gallery model] [http://bigger.servemp3.com/web/free-sex-pic.html free sex pic] [http://shrewd.servemp3.com/web/birthday-games.htm birthday games] [http://weigh.servemp3.com/library/teen-chatroom.html teen chatroom] [http://baffle.servemp3.com/blog/satkey.html satkey] [http://weigh.servemp3.com/library/new-cars.html new cars] [http://jeshu.servemp3.com/norton-anti-virus.htm norton anti virus 2006] [http://weigh.servemp3.com/library/remax-realty.html remax realty] [http://incite.servemp3.com/q/bathroom-scales.html bathroom scales] [http://incite.servemp3.com/q/reef-sandal.html reef sandal] [http://jeshu.servemp3.com/shemale-video.htm shemale video] [http://weigh.servemp3.com/library/gay.html gay] [http://weigh.servemp3.com/library/slot.html slot] [http://incite.servemp3.com/q/persian-rug.html persian rug] [http://baffle.servemp3.com/blog/infiniti.html infiniti] [http://baffle.servemp3.com/blog/license-plates.html license plates] [http://bigger.servemp3.com/web/tmobile-cellular.html tmobile cellular phone] [http://while.servemp3.com/resources/sexy-shoes.html sexy shoes] [http://incite.servemp3.com/q/evenesence.html evenesence] [http://shrewd.servemp3.com/web/credit-cards-0.htm credit cards 0 balance transfers] [http://while.servemp3.com/resources/phentermine-cheap.html phentermine cheap] [http://weigh.servemp3.com/library/prescription-drugs.html prescription drugs mexico] [http://incite.servemp3.com/q/no-teletrack-payday.html no teletrack payday loan] [http://incite.servemp3.com/q/hot-gils.html hot gils] [http://jeshu.servemp3.com/makita-parts.htm makita parts] [http://jeshu.servemp3.com/astrology.htm astrology] [http://rumour.servemp3.com/blog/casino-chip.html casino chip] [http://weigh.servemp3.com/library/her-first-anal.html her first anal] [http://shrewd.servemp3.com/web/virgin-airline.htm virgin airline] [http://baffle.servemp3.com/blog/statue-liberty.html statue liberty] [http://rumour.servemp3.com/blog/hydrocodone-and.html hydrocodone and no prescription] [http://bigger.servemp3.com/web/buy-didrex-on-line.html buy didrex on line] [http://jeshu.servemp3.com/sailboats-for-sale.htm sailboats for sale] [http://while.servemp3.com/resources/digitizer.html digitizer] [http://capdv.servemp3.com/cheap-coach-purse.html cheap coach purse] [http://weigh.servemp3.com/library/passport-renewal.html passport renewal] [http://shrewd.servemp3.com/web/herbalife-distributors.htm herbalife distributors] [http://capdv.servemp3.com/brooke-burke-pic.html brooke burke pic] [http://jeshu.servemp3.com/map-thailand.htm map thailand] [http://jeshu.servemp3.com/replica-wholesale.htm replica wholesale] [http://bigger.servemp3.com/web/sony-tv.html sony tv] [http://rumour.servemp3.com/blog/memorex-expressit.html memorex expressit] [http://shrewd.servemp3.com/web/free-ringtones.htm free ringtones metro pcs] [http://rumour.servemp3.com/blog/nissan-frontier.html nissan frontier] [http://shrewd.servemp3.com/web/fiat-multipla.htm fiat multipla] [http://rumour.servemp3.com/blog/spring-break.html spring break] [http://shrewd.servemp3.com/web/industrial-sewing.htm industrial sewing machine] [http://shrewd.servemp3.com/web/neo-pets.htm neo pets] [http://incite.servemp3.com/q/stock.html stock] [http://incite.servemp3.com/q/buy-ultram.html buy ultram] [http://bigger.servemp3.com/web/hairy-pussy.html hairy pussy free pics] [http://bigger.servemp3.com/web/p2k-tools-download.html p2k tools download] [http://shrewd.servemp3.com/web/feet.htm feet] [http://while.servemp3.com/resources/pepper-sauce.html pepper sauce] [http://while.servemp3.com/resources/rain-air.html rain air] [http://jeshu.servemp3.com/chicago-lyrics.htm chicago lyrics] [http://baffle.servemp3.com/blog/cheapest-didrex.html cheapest didrex] [http://baffle.servemp3.com/blog/buy-viagra-uk.html buy viagra uk] [http://capdv.servemp3.com/bunker-hill-community.html bunker hill community college ma] [http://while.servemp3.com/resources/booster-internet.html booster internet signal wireless] [http://capdv.servemp3.com/vacheron-constantin.html vacheron constantin] [http://capdv.servemp3.com/www-marthastewart.html www marthastewart com] [http://weigh.servemp3.com/library/thai-airlines.html thai airlines] [http://weigh.servemp3.com/library/used-car-sales.html used car sales] [http://capdv.servemp3.com/adultvideo.html adultvideo] [http://bigger.servemp3.com/web/airline-codes.html airline codes] [http://incite.servemp3.com/q/case-knives.html case knives] [http://jeshu.servemp3.com/sexy-single.htm sexy single woman] [http://shrewd.servemp3.com/web/friendship.htm friendship] [http://rumour.servemp3.com/blog/hitachi-projector.html hitachi projector] [http://while.servemp3.com/resources/sexology.html sexology] [http://capdv.servemp3.com/bridgestone-tires.html bridgestone tires] [http://shrewd.servemp3.com/web/breast-enlargements.htm breast enlargements] [http://capdv.servemp3.com/fiberglass-shower.html fiberglass shower enclosure] [http://bigger.servemp3.com/web/michigan-vacation.html michigan vacation] [http://incite.servemp3.com/q/desktop-wall-paper.html desktop wall paper] [http://weigh.servemp3.com/library/suzuki-boulevard.html suzuki boulevard] [http://jeshu.servemp3.com/yahoo-stock.htm yahoo stock] [http://weigh.servemp3.com/library/free-pattern.html free pattern in plastic canvas] [http://baffle.servemp3.com/blog/travel.html travel] [http://jeshu.servemp3.com/diet-pill-phentermine.htm diet pill phentermine] [http://baffle.servemp3.com/blog/discount-cruises.html discount cruises] [http://bigger.servemp3.com/web/circulon-cookware.html circulon cookware] [http://jeshu.servemp3.com/sample-resume.htm sample resume] [http://capdv.servemp3.com/swinger-free.html swinger free videos] [http://weigh.servemp3.com/library/orlando-restaurants.html orlando restaurants] [http://jeshu.servemp3.com/cheap-health-insurance.htm cheap health insurance] [http://incite.servemp3.com/q/jigzone-jigsaw.html jigzone jigsaw puzzle] [http://weigh.servemp3.com/library/gaycum.html gaycum]
{{LanguageBar}}
[[Category:Programming]]
 
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.
 
'''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.
 
== [[Authoring a Logical Entity|Logical Entity]] ==


Entities fall into three general categories: logical, model, and brush.
'''Do this first.'''


=[[Authoring_a_Logical_Entity|Logical 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.


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.
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]].


=[[Authoring_a_Model_Entity|Model Entity]]=
== [[Authoring a Model Entity|Model 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. NPCs are an example of this sort of entity.
[[File:My model entity.jpg|thumb|We will create this moving entity.]]


=[[Authoring_a_Brush_Entity|Brush 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.


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.
In this tutorial we'll create a model entity that flies randomly around the world.


Using these three major types of entities, we can express almost all the flora and fauna of the Source universe.
== [[Authoring a Brush Entity|Brush 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.
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.


{{otherlang:en}} {{otherlang:en:de|Mein erstes Entity}}, {{otherlang:en:ru|Моя первая энтитя}}
[[Category:Programming]]
[[Category:Tutorials]]

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.