#include "entitylist.h" CBaseEntity *entity = gEntList.FindEntityByName( NULL, name, NULL );
The first and last NULLs are for the start entity and activator; here's the definition of FindEntityByName: CBaseEntity *CGlobalEntityList::FindEntityByName( CBaseEntity *pStartEntity, const char *szName, CBaseEntity *pActivator, CBaseEntity *pCaller ) gEntList is globally defined. ;) Philip Withnall > Actually I have another question that's loosely related... > > I haven't actually used Hammer so I'm not sure, but I believe you can > create > an entity as defined in the FGD, and then assign it with a name? So how > would I go about in the source code getting a handle on the entity in the > map that was named 'redflag' for instance of entity type eftcmp_flag? > > CEFTCMPFlag handle = ...... :-) > > Thanks, > > --------------------------------------- > Chris Adams > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Adams > Sent: 17 August 2005 15:24 > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] Resetting model entity for CTF > > > Hi, > > I'm currently trying to work in CTF as a gametype for the MOD I'm working > on, but I'm having a bit of trouble on resetting the model entity > (restoring > it to its map-defined position) at the appropriate points. I'll probably > end > up going through it all and working something out eventually, but I just > thought I'd ask here in case anyone can recommend something and save me > the > hassle :-) > > Thanks, > > --------------------------------------- > Chris Adams > > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders