ent_next ignores last model placed in WED.

Posted By: Helghast

ent_next ignores last model placed in WED. - 04/06/10 13:48

As the subject says.
If I use the snippet from the manual (under ent_next);

Code:
function hide_all_ents()
{
	you = ent_next(NULL); // retrieve first entity
 	while (you) // repeat until there are no more entities
	{ 
		set(you,INVISIBLE); // make entity invisible
 		you = ent_next(you); // get next entity
 	}
}



And the last object in the level list is a model, that entity will not be changed by this code...

regards,
Posted By: jcl

Re: ent_next ignores last model placed in WED. - 04/07/10 08:30

ent_next does not care what kind of entity it is. It just walks through the entity list and finds all entities. Maybe your problem has a different reason?
Posted By: Helghast

Re: ent_next ignores last model placed in WED. - 04/07/10 08:46

It goes through the while list, but ignores the very last entity.
It doesnt matter what entity it is indeed... It just doesnt take the last one into account. No matter what i try to do with it.

regards,
Posted By: jcl

Re: ent_next ignores last model placed in WED. - 04/07/10 13:31

Hmm, I can not confirm this problem so far. Does this only happen in a particular level? Maybe you're calling that function at a wrong time when not all entities are created yet?
© 2024 lite-C Forums