View Single Post
Re: monstermaker tweak
Old
  (#5)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: monstermaker tweak - 07-04-2004

It's a little hard to understand what you are saying without seeing your code.

Precache() should only be precacheing resources needed by that monster. For example, in the SDK barney.cpp file, the CBarney::Precache() is...
Code:
void CBarney :: Precache()
{
PRECACHE_MODEL("models/barney.mdl");
PRECACHE_SOUND("barney/ba_attack1.wav" );
PRECACHE_SOUND("barney/ba_attack2.wav" );
PRECACHE_SOUND("barney/ba_pain1.wav");
PRECACHE_SOUND("barney/ba_pain2.wav");
PRECACHE_SOUND("barney/ba_pain3.wav");
PRECACHE_SOUND("barney/ba_die1.wav");
PRECACHE_SOUND("barney/ba_die2.wav");
PRECACHE_SOUND("barney/ba_die3.wav");
 
// every new barney must call this, otherwise
// when a level is loaded, nobody will talk (time is reset to 0)
TalkInit();
CTalkMonster::Precache();
}
...the Spawn() function calls Precache(), then it sets the model...
Code:
void CBarney :: Spawn()
{
Precache( );
SET_MODEL(ENT(pev), "models/barney.mdl");
UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX);
...what your code should be doing is CHANGING that model AFTER the Spawn() function returns back to the engine.

Is that what you are doing?

(edit: stupid smilies)

botman
  
Reply With Quote