Re: More Varied AI Research Paths
Posted: Fri Apr 27, 2018 10:05 pm
sven wrote:(Tricks like the one in init_production_desire.ships() rely on the fact that _ENV behaves differently when an ai_context call is executing than then it does during file-load.)
Ah, I see. It seems I misunderstood how the temporary AI state worked. Probably should have read the comments a little more closely... "when you access variables inside those functions"
So in order to store something in the temporary AI state you need to assign it to an upvalue when inside an ai_context call, like what is done in init_production_desire.ships().