FAQ  •  Login

Entity lifecycle

<<

Limpet

User avatar

Specialist
Specialist

Posts: 160

Joined: Fri Feb 27, 2009 12:44 am

Location: NC

Post Sat Mar 21, 2009 11:27 pm

Entity lifecycle

Can anyone explain to me the lifecycle of an entity?

From what I can find it goes something like constructor -> spawn() -> activate() -> think() but I'm still not sure on if this only applies to the server side or if the client side needs it as well.

And I had another more specific question, but I lost it. Bah.
<<

Craziestdan

Warrant Officer 1
Warrant Officer 1

Posts: 1043

Joined: Wed Mar 26, 2008 2:36 pm

Post Sat Mar 21, 2009 11:41 pm

Re: Entity lifecycle

Worth reading through here:
http://developer.valvesoftware.com/wiki ... rst_Entity

Takes you through making 3 different types of entities from scratch.
<<

joff

User avatar

First Sergeant
First Sergeant

Posts: 787

Joined: Sat Oct 25, 2008 2:44 am

Location: Reading / UK

Post Sun Mar 22, 2009 3:49 am

Re: Entity lifecycle

useful link Dan
Programmer / Web Designer / Server Admin
www.joffcom.net
www.pontification.net
<<

Limpet

User avatar

Specialist
Specialist

Posts: 160

Joined: Fri Feb 27, 2009 12:44 am

Location: NC

Post Sun Mar 22, 2009 5:16 pm

Re: Entity lifecycle

I had gone through those already, but still confused. I think my confusion is just in how Source knows when to call a method or what method to call.
<<

DeathSpector

User avatar

Warrant Officer 1
Warrant Officer 1

Posts: 1076

Joined: Sun Feb 10, 2008 6:05 pm

Location: Kans City

Post Mon Mar 23, 2009 10:56 am

Re: Entity lifecycle

Limpet wrote:I had gone through those already, but still confused. I think my confusion is just in how Source knows when to call a method or what method to call.

Do you mean for a npc? or what kind of entity?

Totall guess, 'no Google'.

random examples from the ep2 folder

->(scripts/)

(npc's)
actbusy.txt

(sound)
game_sounds_addendum_ep2.txt

(hud)
hudanimations_manifest.txt
titles.txt

(prop)
propdata.txt

(weapons)
weapon_manifest.txt

Helped or not? 8-)


or maybe you needed this, down at the bottom of dans link.
Programming
<<

Limpet

User avatar

Specialist
Specialist

Posts: 160

Joined: Fri Feb 27, 2009 12:44 am

Location: NC

Post Mon Mar 23, 2009 1:14 pm

Re: Entity lifecycle

I'm still working on the vgui entities (yeah, still). Though, I'm also all over just looking at how the code given to you for a mod is set up. And while a lot of vgui elements are controlled by scripts, the scripts themselves are only external controls and don't add functionality which is what I'm trying to do.

Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.