Page 1 of 1
Some LUA Questions
Posted: Tue Mar 30, 2010 1:53 pm
by Filipinio
I have been looking in Fred's site and i found some interesting thngs to add into my LUA i was wondering if anybody could tell me how to use:
EnableAIAutoBalance()
i understand what it does but i dont know how to enable it and i dont know when it enables
Re: Some LUA Questions
Posted: Wed Mar 31, 2010 1:23 am
by lucasfart
Just type exactly that in
It just makes it automatically adjust so no need to add in any specific numbers. it is enabled as soon as the game starts, but it might be useable halfway through if you set up a certain condition for its use...
Re: Some LUA Questions
Posted: Wed Mar 31, 2010 2:55 pm
by Filipinio
Oh, i have another question in the LUA is there sutch thing as:
SetMinFlyHeight(120)
SetMinPlayerFlyHeight(120)
???
Or is thier any way to make a barrier to stop Flyers from flying to low? (Mygeeto has a kind of 'DeathRegion' and i dont want the Flyers to die)
Re: Some LUA Questions
Posted: Wed Mar 31, 2010 3:59 pm
by myers73
check the hoth LUA
Re: Some LUA Questions
Posted: Wed Mar 31, 2010 4:47 pm
by Filipinio
um, which line am i meant to be looking at?
somelines look like it but im not so sure...
Re: Some LUA Questions
Posted: Wed Mar 31, 2010 4:59 pm
by lucasfart
search for the word "flyer" in your lua, its a command with that. and yes, the other two exist in all lua's by default i think...
Re: Some LUA Questions
Posted: Thu Apr 01, 2010 8:05 am
by Filipinio
i have another question, what is the LUA code to stop AI capturing CP's?
Re: Some LUA Questions
Posted: Thu Apr 01, 2010 11:12 am
by Teancum
From the FAQ/Everything You Need 2.0 thread --> LUA Section --> LUA Callback reference link.
http://www.secretsociety.com/forum/down ... erence.txt
AICanCaptureCP()
Re: Some LUA Questions
Posted: Thu Apr 01, 2010 11:23 am
by Filipinio
so that STOPS AI from capturing cp's if i just put that line in my LUA?
Re: Some LUA Questions
Posted: Thu Apr 01, 2010 1:55 pm
by Teancum
It should. I've never used it but it's pretty clear cut

Try using
AICanCaptureCP(False)
Re: Some LUA Questions
Posted: Fri Apr 02, 2010 8:36 am
by Filipinio
Thanks Tean, I have another question is there anyway to make a cp non-capturable for humans too? I no you can get rid of the Capture Region in ZeroEditor but is there a way to do it through the LUA?
Re: Some LUA Questions
Posted: Fri Apr 02, 2010 8:18 pm
by lucasfart
I'm guessing you want to use this so that you can add/remove the capture region at certain times, probably in a campaign?
If that is so, just use the following 2 functions to add/remove the capture region:
To add a capture region, type the following:
SetProperty("cpnamehere", CaptureRegion, "cpcaptureregionhere")
To remove it, add this:
SetProperty("cpnamehere", CaptureRegion, "")
If you leave the capture region's name empty, it means that there is no capture region, hence no-one can capture it.
I hope thats what you were looking for....
Re: Some LUA Questions
Posted: Sun Apr 04, 2010 9:42 am
by Fiodis
What if you used DeactivateRegion?
Re: Some LUA Questions
Posted: Sun Apr 04, 2010 10:14 am
by Filipinio
thanks, how do i use it?
is it like: DeactivateRegionCP ("CP1_CON")
Re: Some LUA Questions
Posted: Sun Apr 04, 2010 3:41 pm
by Teancum
Filipinio wrote:thanks, how do i use it?
is it like: DeactivateRegionCP ("CP1_CON")
It's just DeactivateRegion("insert name of region here"), not DeactivateRegion
CP()