Alright. Long story short, I wanted to create some scripts (Singleplayer mission) that would allow an AI Demo General to use the rebel ambush, and blow them up, just like multiplayer. However, from my testing, this cannot be done, and here's why.
I created two Demo General players. One to attack, build, etc. The other to simply use the Ambush when it's off cooldown. Now there's a reason for this. When the rebel ambush is created, the rebels aren't part of any specific team other than the main player AI. So I tried having the entire player team use the tertiary suicide button, with no success.
After that I tried 'pushing' the rebels into their own team, which would detonate itself when it was created. When the Ambush is fired, there's a 3.1 second timer (the ambush has a 3 second fade-in time, didn't know if that effected anything). After 3.1 seconds, the AI creates/recruits a team of 10 rebels (using existing units, so, Ambush rebels) within a giant range and then uses the tertiary suicide ability when the team is created. Did not work.
I tried running various subroutine scripts, using flags and different team things, but nothing worked.
Turns out it might be a command set issue. I tried getting a named unit (a GLA Worker) to use tertiary suicide after the 3.1 second timer, which caused a crash for some reason. My theory being, by default, the Demo Rebel CommandSet doesn't have the tertiary suicide available.
Using a named Demo Rebel, there is no Demo_Command_TertiarySuicide by default, since it's an upgrade.
A demo worker however, does have tertiary suicide as an option (In the worldbuilder script).
I looked around for some topics on something like this, but couldn't find anything.
If anyone has any ideas on how/if this could be done, I'd really appreciate it.
Home is where the InnerPerimeter is.