Hey guys.
I just wanted to attach a Sword to a Model's hand.
I tried this with vec_for_vertex, but everytime, when I save the position of the Vertex of the charakter, to a vector like temp or something, it says "empty pointer" ôo.
action player_move()
{
VECTOR* temp;
charakter = me;
set (charakter, SHADOW);
charakter.z_offset = 28;
while(1)
{
handle_gravity();
camera_handle();
movement_handle();
animation_handle();
tt_npc_handle();
wait(1);
}
}that's what my player action looks like at the moment.
when I add:
vec_for_vertex(temp, charakter, 1178);
ent_create("sword.mdl", temp, NULL);
just before the while loop begins, I get the error that there is an empty pointer in tt_npc_handle.
I just wanted to test so far, if the sword model will be created near the vertex , when I run the engine. but I just get the error..
I wanted to change the "NULL" to an action that handles with the postiion of the sword, during moving of the charakter etc.
but I'm not able to solve the problem with the error..
I even don't know why he indicates an error in the tt_npc_handle thing, hasn't much to do, with the vec_for_vertex, or does this command erase the pointers oO?
here's the tt_npc_handle code
//NPC TextBox Handling
function tt_npc_handle()
{
if(txtbox == aus && talking == aus)
{
on_e = scan_npcs;
}
if(txtbox == an && talking == an)
{
on_e = NULL;
}
if(txtbox == an && txtnext == an)
{
on_e = nextstring;
}
if(txtbox == an && txtend == an)
{
on_e = txtclose;
}
}well I don't even know what to do and why the empty pointer error appears.
hope you can help me with that ..
greets