Author Topic: access to directory (nt.listdir(***)) / SinglePlayer in QB & Galaxy Charts  (Read 7398 times)

Offline cnotsch

  • Posts: 85
  • Cookies: 3
no i didn't add my question afterwards.

what do you mean it does not know where to look?
it works fine in SP;
i gets passed the shipclass-pointer pShip;
it works in QB with the marauder and any other ship wich has warp engines;
it does work in the console  :?;
it does not work in SPinQB  :(

the conditional AI:
Code: [Select]
#########################################
# Creating ConditionalAI WarpEnginesNotDisabled at (302, 287)
## Conditions:
#### Condition WarpDisabled
pWarpDisabled = App.ConditionScript_Create("Conditions.ConditionSystemDisabled", "ConditionSystemDisabled", pShip.GetName(),  App.CT_WARP_ENGINE_SUBSYSTEM, 1)
## Evaluation function:
def EvalFunc(bWarpDisabled):
ACTIVE = App.ArtificialIntelligence.US_ACTIVE
DORMANT = App.ArtificialIntelligence.US_DORMANT
DONE = App.ArtificialIntelligence.US_DONE
if bWarpDisabled:
return DONE
return ACTIVE
## The ConditionalAI:
pWarpEnginesNotDisabled = App.ConditionalAI_Create(pShip, "WarpEnginesNotDisabled")
pWarpEnginesNotDisabled.SetInterruptable(1)
pWarpEnginesNotDisabled.SetContainedAI(pPriorityList)
pWarpEnginesNotDisabled.AddCondition(pWarpDisabled)
pWarpEnginesNotDisabled.SetEvaluationFunction(EvalFunc)
# Done creating ConditionalAI WarpEnginesNotDisabled
#########################################

it is assigned with that line:
Code: [Select]
pMarauder.SetAI(E2M2_AI_MarauderRun.CreateAI(pMarauder, fSpeed))

i've attached the whole AI in case you want to take a look at it

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
How do you mean it works?
Why say it doesn't if it does?

I meant, maybe the AI doesn't know where to look for the warp engines.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline cnotsch

  • Posts: 85
  • Cookies: 3
i said meant it works everywhere (in QB assigned to any ship with WEngines, in the normal SP mission, ...) except in SPinQB (my mod)

how it works? without that problem:  :wink:
Now i got to another problem, again  :oops: :oops:,you know the mission where you have to spy on the marauder class ship called kravis in E2M2, when disabling it's warp engines the AI does not continue so that the marauder stopps attacking, and hails the player, instead it just keeps attacking, if i check manually if the warp engines are down (pShip.GetWarpEngineSubsystem().IsDisabled()) it returns 1, but the conditional AI seems to stay ACTIVE....

meaning the AI works till the end and calls the script action

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Are you sure you have managed to attach all the required events?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline cnotsch

  • Posts: 85
  • Cookies: 3
I could control that from the main script with events yes, but normally all script actions are called by the AIs and there ate no events. This just drives me crazy that i have to rewrite nearly the whole mission just because of these silly little problems...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Well, it would appear that the AI is only part of it. There is also a weapon fire event in the mission itself.



[EDIT] It would appear to be easier to have a better, and more uniform, mission select menu that handles Foundation correctly for everything.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.