Author Topic: Calling all coders - please help me test Infected AI v2!  (Read 4561 times)

0 Members and 1 Guest are viewing this topic.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Calling all coders - please help me test Infected AI v2!
« Reply #60 on: January 01, 2011, 10:11:25 PM »
I've reorganised the tabs to make this a bit clearer.


Code: [Select]
if GetEmpire(2):GetNumOwnedAsteroids() == 0 and GetEmpire(3):GetNumOwnedAsteroids() == 0 then

if newtimer == nil then
newtimer = GetGameTime() + 5
end

if newtimer <= GetGameTime() then
Pause()
MessageBox("You have controlled The Entire Region. This is most excellent news! Be pleased that you have conquered another bunch of pesky inter-galactic hooligans.")
WaitDialog()
Unpause()
Quit(true)
end
end


if GetEmpire(1):GetNumOwnedAsteroids() == 0 then
Pause()
MessageBox("Calamity! Total  DEFEAT! ...The Central Region is a hostile place indeed... ")
WaitDialog()
Unpause()
Quit(false)
end

The end is necessary.  Give me a minute to look over this and I'll see if I can figure out what's wrong.  :>


UPDATE:  Try that.  :>
« Last Edit: January 01, 2011, 10:17:05 PM by annikk.exe »

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Calling all coders - please help me test Infected AI v2!
« Reply #61 on: January 02, 2011, 07:18:45 PM »
thx.

let us know when the latest version is done wont you?! ;D

what are the additions being added?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Calling all coders - please help me test Infected AI v2!
« Reply #62 on: January 02, 2011, 08:33:22 PM »
Just random bug fixes to stop the AI getting flummoxed by unusual situations.  I can't remember if I added any new features, per se.


I'll go update the main post now.  By the way, I've discovered (thanks to Cousin Joel) that it's possible to just organise my different modules into functions.
Here they all are:


You can click the "+" next to each function and it will expand out, so you can see the code inside.  :>


Then inside LevelSetup(), I use the following command:

AIInit()

and that initialises the AI engine.
Then, in function LevelLogic(), I use this command:

InfectedAIEngine()

And then the engine just works just like it does normally.  :>


Pretty handy for keeping things organised..

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Calling all coders - please help me test Infected AI v2!
« Reply #63 on: January 02, 2011, 08:43:17 PM »
That's the new engine posted.

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Calling all coders - please help me test Infected AI v2!
« Reply #64 on: January 02, 2011, 11:44:21 PM »
{mister burns voice}
excellent...