Moving group of biters on the map

Place to get help with not working mods / modding interface.
PunkSkeleton
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Sun Oct 09, 2016 2:10 pm
Contact:

Moving group of biters on the map

Post by PunkSkeleton »

I completely fail at this seemingly simple task. How should it be done? Can someone post a simple code example which issues a command and then issues next command once the previous one is completed and it just works 100% of time.
I create a LuaCommandable object with some biters in it and then issue commands. I remember the commandable object and either periodically check if previous command finish/biters got stuck or use on_ai_command_completed event.
The problem is that the LuaCommandable gets invalidated randomly. Most of my code is a partially working workaround to this problem and I always end with stuck biters on the map or/and very strange behavior.
There is ai_settings.allow_destroy_when_commands_fail = false but it is a property of single biter not a LuaCommandable and setting it to every biter in the group does not help. I also detach every biter from spawner.
Post Reply

Return to “Modding help”