Hey guys!

I created a level in wed, placed the earth model in it and assigned an action to it. The action includes edited functions from that of the earthball sample but whenever I try to call the kick function, I get an error. empty pointer called in kick.

Another problem I have is how to relate different entities. Suppose I have three different entities with different actions and I want them do something like shake hands when they are close to each other. I don't understand how I'll differentiate them since they are all using 'my' in their actions. The vec_dist I have is then vec_dist(my.x, my.x) and that creates run time errors then because they are all called my. How do you solve this?

regarding the first question, here's my code... anything wrong?

[code]

function kick();


action move_me()
{

set(my, SHADOW);

phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 1, PH_SPHERE);
phent_setfriction(my,90);
phent_setelasticity(my,75,100);
phent_setdamping(my,30,5);
phent_addvelcentral(my,vector(10,10,0));
ph_setgravity(vector(0,0,-500));

my.emask |= ENABLE_FRICTION;
while(1){
on_space = kick;
wait(1);
}

}

function kick()
{
VECTOR vKick;
vKick.x = 150; vKick.y = 0; vKick.z = 75;
vec_rotate(vKick, camera.pan);
phent_addvelcentral(my, vKick);
}

[\code]


I know I can.