Properly remove entity at end of the round.
I have a class that can create poison bombs and it has a task to remove the entity. When I try to remove this entity and it's task at the end of the round the server crashes.
My question is, how can I remove this entity safely if it is still there at the end of the round? PHP Code:
|
Re: Properly remove entity at end of the round.
This should work.
PHP Code:
|
Re: Properly remove entity at end of the round.
It's better to use think instead of task.
|
Re: Properly remove entity at end of the round.
Yeah I tried removing with find_ent_by_class before Yokomo and it crashed but I will try it again with the taskID's in place, thanks for the suggestion.
If that doesn't work I'll use think. |
Re: Properly remove entity at end of the round.
if you need to remove all entities with classname "poison", just do remove_entity_name("poison")
|
Re: Properly remove entity at end of the round.
I suggest you to use both engine and fakemeta.
Better to cache classname in a global var so it saves some memory. You can directly set allocated classname value instead of filling memory again and again. Use think instead of tasks (if you need other feature than removal in the think process it can be done). Remove all remaining entities at new round. PHP Code:
|
| All times are GMT -4. The time now is 15:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.