frustrated in ent_remove()

Posted By: Frederick_Lim

frustrated in ent_remove() - 11/30/07 02:09

I am frustrated in ent_remove()

Question: I'd like to know how to detect the entity was removed by ent_remove()?

I found check the entity pointer against NULL is not work, it seems after execute ent_remove(e), the e entity pointer is not NULL. In fact, once the entity removed, I still able to access its skill value.

Because of that, I am not checking the (e != NULL), but checking (e.health < 1).
It seems works prefect, everything looks good. But I am worrying about potential crash.
Posted By: i_program_games

Re: frustrated in ent_remove() - 12/06/07 21:21

If that's the case try something like

ent_remove(pEnt);
pEnt=NULL;//Set it to null yourself?

Also, are you waiting one after the ent_remove command?

ent_remove(pEnt);
wait(1);//did you try this?
Posted By: Frederick_Lim

Re: frustrated in ent_remove() - 12/08/07 03:21

Thank you. I solved my problem, I just mess up with pointers in my mind.
© 2023 lite-C Forums