Hello,

I have a little problem. I have 5 entities, those are the same models. So I have 1 model to save diskspace and create it 5 times with ent_create. Every entity have this code:

Code:
action arm1 {
	arm01 = my;
	my.passable = on;
	
	vec_for_vertex(temp,my,86);
	ent_create("ZTkrzn.mdl",temp,kruis1);
	
	var anim_time = 0;
	var anim;
	
	ang_sin = 0;
	speed_arm = 0.3;
	max_arm = 0;
	
	wait(-1);
	
	while(1) {
		vec_for_vertex(temp,ondermolen1,259);
		
		my.x = temp.x;
		my.y = temp.y;
		my.z = temp.z;
		my.pan = ondermolen1.pan;
		
		ent_animate(my, "windmill", anim, ANM_cycle);
		anim += anim_time;
		anim_time = 2*time_step;
		
		if(key_r == 1) {
			if(max_arm <= 8) {
				max_arm += 0.1*time_step;
			}
		}
		if(key_f == 1) {
			if(max_arm > 0) {
				max_arm -= 0.1*time_step;
			}
		}
		
		ang_sin += speed_arm;
		if(ang_sin >= 360) {
			ang_sin += 360;
		}
		
		my.tilt = -max_arm+sin(ang_sin) * max_arm;
		
		wait(1);
	}
}

The only difference is that the first wait-function is different. The other 4 entities have wait(-2), wait(-3) and so on.

The problem is that the entities start at the same point as arm1 and then after a couple of seconds jump back to their original position.

Is there a sollution for this problem?