Author Topic: Can you change AI scripts mid-mission?  (Read 1483 times)

0 Members and 1 Guest are viewing this topic.

Offline Lorric

  • 212
Can you change AI scripts mid-mission?
This is just a curiosity I have. I don't even need an explanation on how to do it or anything. I just wonder if it's possible. It could be used in contexts such as...

*Reinforcements have arrived*

"Alright! The advantage is ours now! Attack!"
"Boot's on the other foot now!"

*Allied morale is soaring!*

*All allied units AI changes from "Captain" to "Colonel"*

Or maybe something like "The enemy have never lost a battle when the XXX has been involved. So we're going to destroy that ship and crush their morale."

*XXX destroyed*

"The enemy are panicking! Destroy them!"

*All enemy units have AI changed from "Captain" to "Lieutenant"

or "The Shivans are nothing without their commander. We take out XXX, and they will collapse, just like when we destroyed the Lucifer."

*XXX destroyed*

"Crush them!!!"

*All enemy units have AI changed from "Captain" to "Coward".

I have no intention of making such a mission, I've never made any mission (any proper mission anyway), but it would be a way for the player to effect meaningful change in a BOE mission. It would work for any mission, but I thought I'd mention that.
« Last Edit: January 30, 2012, 09:04:06 pm by Lorric »

 

Offline Sushi

  • Art Critic
  • 211
Re: Can you change AI scripts mid-mission?
There's a change-ai-class SEXP that should do what you're looking for (or maybe set-ai-class, one of the two).

 

Offline Lorric

  • 212
Re: Can you change AI scripts mid-mission?
There's a change-ai-class SEXP that should do what you're looking for (or maybe set-ai-class, one of the two).

So it can be done. Thanks.