Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1785

Lua Labs • Re: Proposed micro_ai logic sanity check - syntax query

$
0
0
I understand that location defines the filepath to the relevant code however I don't seem able to find where this code is actually called/executed?
I notice that the lua file name always matches a table creation, here (within the file ca_forest_animals_move.lua) in this case:
It's called from inside the engine, so you won't find "the place it's called" anywhere in WML or Lua.
As I'm writing a custom mai I'd like to have everything in a single file, so will remove location = and simply embed the same code within the mai definition file that calls the various ca assignments.
However, do I need to put a function call/table definition/something else in place of location?
Hmm. There might actually be a way to make it work if there's only one CA – you might be able to put the MicroAI definition in the CA file and have the location refer to the same file. I don't know if it would work, but if you really want to keep things in one file, it might be worth a try.

Statistics: Posted by Celtic_Minstrel — Yesterday, 5:51 pm



Viewing all articles
Browse latest Browse all 1785

Trending Articles