Data Realms Fan Forums http://45.55.195.193/ |
|
Assigning new AI to old factions? http://45.55.195.193/viewtopic.php?f=4&t=25228 |
Page 1 of 1 |
Author: | eddevilish [ Thu Aug 18, 2011 8:46 pm ] |
Post subject: | Assigning new AI to old factions? |
How do I make it so that older factions (Crobotech, AAL etc) use the new lua AI? An earlier attempt by myself failed miserably, so I would like to know what lines of code need to be added to make it work. Many thanks! |
Author: | zalo [ Thu Aug 18, 2011 10:38 pm ] |
Post subject: | Re: Assigning new AI to old factions? |
IF THE ACTOR DOES NOT ALREADY HAVE A LUA SCRIPT ATTACHED TO HIM (As in, there isn't already a line for him that begins with "ScriptPath"): Somewhere in the .ini under the main actor's definition, add this line: Code: ScriptPath = Base.rte/Actors/AI/HumanAI.lua And you should be good to go. If it does, then you'll need to learn how to splice the two .lua files together. |
Author: | Coops [ Thu Aug 18, 2011 11:13 pm ] |
Post subject: | Re: Assigning new AI to old factions? |
The AI Script only has a function create so really that's the only thing you would need to combine with the actors script. |
Author: | TheLastBanana [ Thu Aug 18, 2011 11:36 pm ] |
Post subject: | Re: Assigning new AI to old factions? |
It also has an UpdateAI function, actually, so you'd need to copy that, too. |
Author: | eddevilish [ Fri Aug 19, 2011 10:15 am ] |
Post subject: | Re: Assigning new AI to old factions? |
Code: ScriptPath = Base.rte/Actors/AI/HumanAI.lua Well that's the line of code I tried copying across to start with, but CC would crash without leaving a crash dump. The actor in question didn't have a script attached beforehand, so I'm not sure what is going wrong. Edit: Nvm, it's decided to work now. Cheers anyway! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |