Page 1 of 1

AI behaviour made with Lua have a bug

Posted: Sat Dec 16, 2017 3:12 am
by Alley
Hello, people!

Long time no see. It seems that today I finally could make an AI with LUA that is able to build and even repair, sell and rebuild a base.
It seems I even didn't have any idea that the best example about building AI can be Soviet mission 5 where AI exactly build a base similarly in skirmish. Probably I somehow put my self together. :)

However, mapping wth LUA is probably still very difficult even for them who are better in mapping Openra than me because even official Soviet mission 5 have a bug where AI builds also on top of another units and buildings. And so also Soviet mission 4.:x I didn't find that the script for custom missions about building AI is much different so probably every mission have that kind of problem. This is what I really don't like but of course, I couldn't fix it by myself.

Is there someone who just can find a solution for this bug also? :) After that I probably may be able to make quite a good missions too already. At least not a lot worse than for official version.

Posted: Sat Dec 16, 2017 4:38 pm
by Matt
Yes, the Lua API can be improved in multiple ways. For the moment you have to get along with its limitations. I suggest you have a look at the hidden gems at https://resource.openra.net/maps/uploader/1087/ which have a lot Lua scripted AI.

See also the following developer discussions about known problems and proposed solutions:

Posted: Sun Dec 17, 2017 11:44 pm
by Alley
Thank you for your answer! :) I'll try to see if I can find some possible improvements from links that you gave me or... I also can make an AI with LUA to do some basic things now. May-be moving on step by step and with a lot of testing I can make my own system slowly that would quite satisfy me too. :)