how to Stop wait function?

Posted By: frankjiang

how to Stop wait function? - 01/29/18 08:07

Code:
void gs_move(ENTITY* ent,VECTOR* tarPos,double speed,int* pframe,var mode){
	
	int b = vec_dist(vector(ent->x,ent->y,0),tarPos) / speed;
	int i;
	*pframe = b;
	for(i = 0;i < b;i++){
		c_move(ent,vector(speed,0,0),vector(0,0,0),mode);
		wait(1);
	}
}



how to stop function gs_move?
Posted By: Ayumi

Re: how to Stop wait function? - 01/29/18 13:06

Use proc_kill or a return task (if(...) return;)
Posted By: frankjiang

Re: how to Stop wait function? - 01/29/18 13:31

yes,i think if...return is useful,thanks
© 2024 lite-C Forums