Hello,

Thank you. You help me to the right position. But I have a (small?) problem. I have made some little changes in you script. (also in the sample you gave to me wich is still working great). But I have the following problem.

When I want to rotate the arm-entity (at your sample gondela_ph) the gondela's don't swing out the right way (See this link). They don't swing to the outside, but backwards (looks like the X-axis). This is the script right now, I use C-Script, not C-Lite.

Swinging gondela code
Code:
function swing_gondela() {
	var con;
	var aang[3];
	while(!molen_arm) {
		wait(1);
	}
	
	phent_settype(my,PH_RIGID,PH_SPHERE);
	phent_setmass(my,1,PH_SPHERE);
	con = phcon_add(PH_HINGE,my,molen_arm);
	
	vec_set(aang,molen_arm.x);
	vec_sub(aang,my.x);
	vec_normalize(aang,1);
	
	phcon_setparams1(con,vector(my.x,my.y,molen_arm.z),vector(aang.x,aang.y,0),nullvector);
	phcon_setparams2(con,vector(-360,360,0),nullvector,nullvector);
}


Arm-code
Code:
action molen {
	
	my.passable = on;
	
	phent_settype(my,PH_RIGID,PH_BOX);
	phent_setmass(my,1,PH_SPHERE);
	gcon = phcon_add(PH_HINGE,my,NULL);
	phcon_setparams1(gcon,my.x,vector(0,0,1),nullvector);
	phcon_setparams2(gcon,vector(-360,360,0),nullvector,nullvector);
	molen_arm = my;
}


Main-code at the bottom of the script.
Code:
function main()
{
	//laad het level
	level_load(level_str);
	ph_setgravity(vector(0,0,-3000));
	while(!molen_arm) {
		wait(1);
	}
	while(1) {
		phcon_setmotor(gcon,vector(3,10,0),nullvector,nullvector);
		
		wait(1);
	}
	//video_set(sys_metrics(0),sys_metrics(1),32,1);
}


I hope you can help me.

Thanks in advance.

Kind regards,

Polypfreak1987