.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   [HL Mod] C++ Scripting Help (http://forums.bots-united.com/showthread.php?t=6119)

Bend3R 08-02-2007 16:41

[HL Mod] C++ Scripting Help
 
Hi, I need help with code line/s if you can.
I have a model with 11 different body sub-models and I don't know how to do
so the Plugin choose random sub-model from the model file.
What for lines do I need to add?

Code:

void CMZombie :: Spawn()
{
 Precache( );
 SET_MODEL(ENT(pev), "modelname.mdl");
 UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );
 
 pev->solid  = SOLID_SLIDEBOX;
 pev->movetype  = MOVETYPE_STEP;
 m_bloodColor  = BLOOD_COLOR_RED;
 pev->health  = gSkillData.zombieHealth;
 pev->view_ofs  = VEC_VIEW;// position of the eyes relative to monster's origin.
 m_flFieldOfView  = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
 m_MonsterState  = MONSTERSTATE_NONE;
 m_afCapability  = bits_CAP_DOORS_GROUP;
 
.......
 
 MonsterInit();
}


jeefo 09-02-2007 16:32

Re: [HL Mod] C++ Scripting Help
 
ou have different sequences of one model in one file ?

if yes, just set pev->sequence to sequence index you need.... (or random one)

Bend3R 10-02-2007 10:13

Re: [HL Mod] C++ Scripting Help
 
its not sequency, its the body part, sub-models.

Bend3R 10-02-2007 11:22

Re: [HL Mod] C++ Scripting Help
 
Tryed with
Code:

pev->body = -1;
but it changed to another body :/
want it to be random body parts.

Bend3R 27-03-2007 20:10

Re: [HL Mod] C++ Scripting Help
 
Figured it out.
Thanks.

jack34 05-04-2007 15:18

Re: [HL Mod] C++ Scripting Help
 
ooops


All times are GMT +2. The time now is 17:32.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.