View Single Post
Re: monstermaker tweak
Old
  (#6)
desNotes
Member
 
Status: Offline
Posts: 12
Join Date: Jan 2004
Default Re: monstermaker tweak - 07-04-2004

Quote:
Originally Posted by botman
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:recache() 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
I have tried to change the model after the Spawn() function and what I get is the regular Barney on the ground and the new model floating above. The new model is like monster_furniture (not killable) and if the default Barney is killed, he will come back with the default model.
  
Reply With Quote