Hi,
der Code ist aus dem AUM 55 unter 'Unanswered questions':
Code:
string sword_mdl = <sword.mdl>;
function attach_sword()
{
proc_late();
my.passable = on; // the sword shouldn't slow down the player
while (you != null)
{
// get the vertex at the bottom of the palm in Med
vec_for_vertex (my.skill1, you, 28);
// get the vertex that separates the thumb and the pointer finger in Med
vec_for_vertex (my.skill4, you, 9);
// compute the vector that will be used by the sword
vec_diff (my.skill7, my.skill4, my.skill1);
// rotate the sword accordingly
vec_to_angle (my.pan, my.skill7);
// put the origin of the sword in the vertex that is placed at the bottom of the palm
vec_set (my.x, my.skill1);
wait (1);
}
}
action my_players_action // this would be your player's action
{
ent_create (sword_mdl, my.x, attach_sword); // put this line in your player's action
// the rest of the code for your player goes here
// .........................................
}
Damit müsste es eigentlich gehen.
Wenn nicht, dann guck nochmal ins AUM
