Posted By: Lecithin
problem with my code, warlock staff attached to warlock - 04/13/10 13:09
I got the staff to attach properly but now there seems to be some collision problems w/the staff and the warlock...? I set the staff to PASSABLE but I'm not sure what else is wrong.
The staff isn't dragging on the ground, its not colliding with the warlock (which shouldn't matter anyway since I set it to passable) but the warlock doesn't walk correctly with the staff in hand whereas he moved flawlessly before.
Here is the staff's code
And here is the wizard's walking code
It seems to me like the staff shouldn't effect the Warlock at all since the staff is set to PASSABLE but that means something else is wrong and I can't figure it out for the life of me.... any suggestions?
Edit* When I place the staff 50 quants into the air everything works flawlessly which again leads me to believe it's a collision problem, did I set PASSABLE incorrectly?
The staff isn't dragging on the ground, its not colliding with the warlock (which shouldn't matter anyway since I set it to passable) but the warlock doesn't walk correctly with the staff in hand whereas he moved flawlessly before.
Here is the staff's code
Code:
function staff() { VECTOR wpos; while(1) { set(my,PASSABLE); vec_for_vertex(wpos, player, 23); my.x = wpos.x; my.y= wpos.y; my.z = wpos.z; my.pan = player.pan; wait(1); } }
And here is the wizard's walking code
Code:
while (1) { if (my.STATE == 1) { my.pan += (key_cul-key_cur)*5*time_step; var distance = (key_cuu-key_cud)*5*time_step; c_move(me, vector(distance,0,0), NULL, GLIDE); my.ANIMATION += 2*distance; ent_animate(me,"walk",my.ANIMATION,ANM_CYCLE); c_trace(my.x,vector(my.x,my.y,my.z-1000),IGNORE_ME | IGNORE_PASSABLE); my.z = hit.z - vFeet.z; if (key_space) { my.ANIMATION = 0; my.STATE = 2; }
It seems to me like the staff shouldn't effect the Warlock at all since the staff is set to PASSABLE but that means something else is wrong and I can't figure it out for the life of me.... any suggestions?
Edit* When I place the staff 50 quants into the air everything works flawlessly which again leads me to believe it's a collision problem, did I set PASSABLE incorrectly?