Originally Posted By: delinkx
one way u can do this:

if ur no of entities are fixed and u know first one has which no of waits, then u create 5 different actions for each with different waits in them. and attach them accordingly as u create the entities.

else within one action only u can give conditions like

if(....)

wait(-1)

else if(...)

wait(-2)

....
.....

Do you mean like this?
Code:
function move() {
	if(arm01) {
		wait(-1);
	} else if(arm02) {
		wait(-2);
	} else if(arm03) {
		wait(-3);
	} else if(arm04) {
		wait(-4);
	} else if(arm05) {
		wait(-5);
	}
}

And in the entity-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);
	move();
	
	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);
	}
}