Originally Posted By: DevoN
I did try to decrease it by altering the action a couple ways. I am only using 1 loop and cycling the animation at 100%.
I can't really understand this one..
Originally Posted By: DevoN
On the other hand there are 2 if statements which check to see if the entity is on screen or not for LOD purposes.
Can you explain this one as well? Why do you need to check, if entity on the screen or not?

My solution, to have one loop for 666 (more/less) flowers and stuff:
Code:
void animateEnt(ENTITY* ent, STRING* scene, spd){
	// change this skill here, if you use it somewhere else:
	ent.skill1 += spd * time_step;
	// animate the entity with a CYCLE (100 %):
	ent_animate(ent, scene, ent.skill1, ANM_CYCLE);
}

void actGrass(){
	// make me passable (speed up collusions):
	set(my, PASSABLE);
	// make me static (consume less memory and CPU resources):
	reset(my, DYNAMIC);
	// give me a unique value:
	my.skill99 = 999;
}

void main(){	
	// load level etc:	
	// main game loop:
	while(1){
		// cycle throw all entities:
		for(you = ent_next(NULL); you; you = ent_next(you)){
			// if we've found a vegetation:
			if(you.skill99 == 999){
				// animate it:
				animateEnt(you, "frame", 5);
			}
		}
		// wait one frame:
		wait(1);
	}
}

It's not tested, but should work (at least, it gives you an idea, of how it should work).


Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung