hi

I have two different Models with much bones and i want to connect this both models with a script!

I want to connect the bone nr. 1 from my human-model with bone nr 1 from my hair-model.

And the same thing with bone 2 and 3!

Is there any way to make this possible
I tried this way :
Quote:



human_ent_p1= ent_create("player1.mdl",NULL,NULL);
human_ent_p1.pan=180;
human_ent_p1.scale_x=0.05;
human_ent_p1.scale_y=0.05;
human_ent_p1.scale_z=0.05;
human_ent_p1.z=50;
human_ent_p1.material = human_material;
set(human_ent_p1,SHADOW||OVERLAY);


//Define the bone points

//PLAYER-BONES
vec_for_bone (Player_Neck_pos_p1,human_ent_p1,"Neck_bone");
vec_for_bone (Player_Head_center_pos_p1,human_ent_p1,"Head_center_bone");
vec_for_bone (Player_Eye_center_pos_p1,human_ent_p1,"Eye_center_bone");



//Create the other parts of the human


hair_p1= ent_create("hair_short.mdl",NULL,NULL);
hair_p1.scale_x=0.05;
hair_p1.scale_y=0.05;
hair_p1.scale_z=0.05;


if(hair_p1==1)
{
//HAIR_BONES
vec_for_bone (Hair_Neck_pos_p1,hair_p1,"Neck_bone"); // Hair_Neck_bone_p1 = ent_create ("barrel.mdl",temp,NULL);
vec_for_bone (Hair_Head_center_pos_p1,hair_p1,"Head_center_bone"); // Hair_Head_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL);
vec_for_bone (Hair_Eye_center_pos_p1,hair_p1,"Eye_center_bone"); // Hair_Eye_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL);


}

...
while(1)
{
if(hair_p1)
{
vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position

vec_for_bone(Hair_Neck_pos_p1.x,human_ent_p1,"Neck_bone"); // place gun at hand position
vec_for_bone(Hair_Head_center_pos_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position
vec_for_bone(Hair_Eye_center_pos_p1.x,human_ent_p1,"Eye_center_bone"); // place gun at hand position

ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle

// vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position
// ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle

}
..



regards sebbi

Last edited by sebbi91; 02/10/10 18:47.

3D-Gamestudio A8 - Commercial