Some LUA Questions
Moderator: Moderators
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Some LUA Questions
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
EnableAIAutoBalance()
i understand what it does but i dont know how to enable it and i dont know when it enables
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Some LUA Questions
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...
Code: Select all
EnableAIAutoBalance()- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
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)
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)
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: Some LUA Questions
check the hoth LUA
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
um, which line am i meant to be looking at?
somelines look like it but im not so sure...
somelines look like it but im not so sure...
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Some LUA Questions
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...
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
i have another question, what is the LUA code to stop AI capturing CP's?
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Some LUA Questions
From the FAQ/Everything You Need 2.0 thread --> LUA Section --> LUA Callback reference link.
http://www.secretsociety.com/forum/down ... erence.txt
AICanCaptureCP()
http://www.secretsociety.com/forum/down ... erence.txt
AICanCaptureCP()
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
so that STOPS AI from capturing cp's if i just put that line in my LUA?
Last edited by Filipinio on Thu Apr 01, 2010 3:11 pm, edited 1 time in total.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Some LUA Questions
It should. I've never used it but it's pretty clear cut
Try using AICanCaptureCP(False)
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
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?
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Some LUA Questions
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....
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....
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Some LUA Questions
What if you used DeactivateRegion?
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
Re: Some LUA Questions
thanks, how do i use it?
is it like: DeactivateRegionCP ("CP1_CON")
is it like: DeactivateRegionCP ("CP1_CON")
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Some LUA Questions
It's just DeactivateRegion("insert name of region here"), not DeactivateRegionCP()Filipinio wrote:thanks, how do i use it?
is it like: DeactivateRegionCP ("CP1_CON")
