12-21-2020, 08:23 AM
Yes! That's the way to go :-)
You usually will manage two lists:
I have this effect into account in my sample project "python platformer". When the player kills an enemy -removing it from the actors list-, the spawn point that created it is also removed from the "object list".
You usually will manage two lists:
- The map "landmarks" list. This is the data you load with TLN_LoadObjectList(). Those are the special points in your map (spawn points, event triggers, etc). It is more or less immutable (static) as it covers special points on he map.
- The active actors list: this one starts empty, but it's highly dynamic. When you spawn something (enemy, bullet, smoke effect, whatever), you add it there. And when you delete something, remove from this list.
I have this effect into account in my sample project "python platformer". When the player kills an enemy -removing it from the actors list-, the spawn point that created it is also removed from the "object list".