Need AI Scripting Help
I need some help getting the AI to build units. Im want to write my own script for a particular map i made, to tailor the AI to the map to make it tougher. Sorry about the book i wrote, but i wanted to make sure there was no confusion in the case of my issue.
I can get it to build a base (all the way up to supers) and an extra dozer, but it wont build anything from the barracks or warfactory (experimenting with just USA).
Ive set the units' production condition to a subroutine that executes every frame, and checks if the barracks has been built. Ive set the teams' priorities, the number of frames to build for, and made sure that the subroutine is active and that nothing turns it off. Difficulty settings are all correct (i left all checkboxes checked on all the scripts), so everything should run no matter what settings are chosen by the player/tester.
The barracks builds (the entire base builds), but they never produce anything. Ive studied skirmish.scb for hours (literally hours, 20 or so), and i cant figure out how the AI decides WHEN to make a team. They dont deactivate the team production condition subroutines, so to me, the team should be built every frame (because the script is set to check itself every frame) once the conditions are met. I dont use a sub for the construction of the dozer, but neither does skirmish.scb (uses 'AI start building team ...'). All the other teams are created with subs, except i cant get them to create. Ive mimicked skirmish.scb as closely as ive seen possible...
So i must be missing something somewhere. Anyone know where?
|