View previous topic :: View next topic |
|
Author |
Message |
Mongooser
Cadet 4th Class

Joined: 20 Aug 2006
Posts: 14

|
|
|

|
|
|
Hello i was wondering how you would add a new AI for a ship loaded into quickbattle. I tried changing the "AIstring" In the ship hardpoint but it did not load up the new AI, it stuck with normal fedattack. Help is appreciated, thanks; )
|
|
|
Back to top |
|
 |
Sim Rex
Moderator


Age: 26
Zodiac: 
Joined: 11 Apr 2002
Posts: 1714

|
|
|

|
|
|
You could set up some kind of trigger, and then apply the new AI to the ship much as one would apply it for a ship in a mission... The only difficulty there is in finding an appropriate trigger 
|
_________________ "Could it be it's the end of our world? All the things that we cherish and love
Nothing left but to face this all on my own, cause I am the chosen one!"
-- The Fallen Angel - Iron Maiden(Smith/Harris)
For beginner scripters - The BCU Mission Scripting Lessons
|
|
Back to top |
|
 |
Mongooser
Cadet 4th Class

Joined: 20 Aug 2006
Posts: 14

|
|
|

|
|
|
I heard there was a way of doing it through foundation, any ideas?
|
|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|
|
Back to top |
|
 |
Mongooser
Cadet 4th Class

Joined: 20 Aug 2006
Posts: 14

|
|
|

|
|
|
I am not 100% sure what you mean... do you mean the ship.py file in the custom/scripts/ships folder?
|
|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|
|
Back to top |
|
 |
Mongooser
Cadet 4th Class

Joined: 20 Aug 2006
Posts: 14

|
|
|

|
|
|
I am unsure of how i could use these lines to tie the ship to a particular ai when quickbattle is loaded up =(
|
|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|

|
|
|
Ok, say you want to give the Sovereign an ai called "UTurnAI" then you do this:
Code: | Foundation.ShipDef.Sovereign.friendlyDetails[2] = "UTurnAI"
Foundation.ShipDef.Sovereign.enemyDetails[2] = "UTurnAI" |
Atleast, this should do the trick as far as Foundation is concerned, I'll have to follow it through the scripts when I find the time.
|
_________________
How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"
|
|
Back to top |
|
 |
|