• point_template and template objects
    0 replies, posted
Hi gyus, i'm looking for work with entity point_template. It contains 16 spaces for templates "<Template>01-16" when entity inicialized it makes ents from list to "TemplateEntities" class where storages all data about this entities. As i know, this informations saves to the map cache: [CODE] void CPointTemplate::StartBuildingTemplates( void ) { // Build our list of template entities for ( int i = 0; i < MAX_NUM_TEMPLATES; i++ ) { if ( m_iszTemplateEntityNames[i] != NULL_STRING ) { CBaseEntity *pEntity = NULL; int iOldNum = m_hTemplateEntities.Count(); // Add all the entities with the matching targetname while ( (pEntity = gEntList.FindEntityByName( pEntity, STRING(m_iszTemplateEntityNames[i]) )) != NULL ) { m_hTemplateEntities.AddToTail( pEntity ); } // Useful mapmaker warning if ( iOldNum == m_hTemplateEntities.Count() ) { Warning( "Couldn't find any entities named %s, which point_template %s is specifying.\n", STRING(m_iszTemplateEntityNames[i]), STRING(GetEntityName()) ); } } } } [/CODE] after this entity become nill in lua, and in save table of entity "point_template" Template01 become name of teplated entity. So there is the answer: How to make template entity object? To make point_template work just need to add template object to map data, but i don't know how to add this...
Sorry, you need to Log In to post a reply to this thread.