Code:
ENTITY* pObject1;
var hHinge;
action Object1
{
phent_settype(my, PH_RIGID, PH_SPHERE); //make physics entity
pObject1= my; // store for later reference
}
action Object2
{
while (pObject1==0) { wait(1); } // wait until object1 is ready....
phent_settype(my, PH_RIGID, PH_SPHERE); //make physics entity
hHinge= phcon_add(PH_HINGE, pObject1, my ); // join the two and store handle
ph_setgravity( vector(0,0,-400) ); // activate gravity
}
Now create a level with two models in it and assign action Object1 to one of them and Object2 to the other. Once you got that working read the manual on constraints and how to set up the details.