Page 1 of 1

[0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Posted: Wed Aug 07, 2019 8:23 pm
by Oarc
THIS IS A CUSTOM SCENARIO SPECIFIC ISSUE so I understand if you don't have time to help.
I tried to figure out how to reproduce this with minimal scenario code, but I still can't figure it out after spending several hours on this.


For some reason, when I use set_autonomous() or destroy() on my unit groups, my game sometimes freezes.
If I uncomment the single line that does that, I don't get any game freezes.

Normally I've seen freezes with bad scenario code where there's a loop condition that it gets stuck in, but I don't think I have any bad loops like that. At least nothing obvious to me.

Either way, I have attached the save that demonstrates one of these freezes.
If you load that game, it should freeze for you within 1-2 seconds.
I'm hoping you have the tools/expertise to quickly identify what I'm doing wrong?

I'd appreciate any help I can get with this, thanks!

EDIT: The specific line in question: Line 1076 in "oarc_enemies.lua"

Code: Select all

attack.group.destroy()
I just made a duplicate of the save, and if I edit the zip file and comment out that line, the save no longer freezes the game after it's loaded.

Re: [0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Posted: Thu Aug 08, 2019 11:01 am
by Klonan
You got yourself caught in an loop with 2 events:

Image

Moving to modding help

Re: [0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Posted: Thu Aug 08, 2019 11:26 am
by Oarc
Thank you!!