Posted by: ComradeGeneral - Tuesday, March 29, 2016 1:13:27 PM
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.
Posted by: Gameanater - Tuesday, March 29, 2016 2:03:17 PM
The Demo General in the Advanced AI Mod Improved by AEI does exactly this, thought I do not remember how. You may want to download it and check it out for yourself, and probably PM/email the author and ask how he did it and where to look. http://www.moddb.com/mods/advanced-ai-mod-for-zero-hour-improved-by-aei
Posted by: ComradeGeneral - Wednesday, May 4, 2016 4:00:59 PM
[quote=Gameanater;139915]The Demo General in the Advanced AI Mod Improved by AEI does exactly this, thought I do not remember how. You may want to download it and check it out for yourself, and probably PM/email the author and ask how he did it and where to look. http://www.moddb.com/mods/advanced-ai-mod-for-zero-hour-improved-by-aei[/quote]
Bumpity bump for update stuff. (Exams and work and stuff)
Alright so after looking through the Advanced AI mod, I noticed a couple things.
First, it adds a new commandButton.
[code]CommandButton Demo_Command_TertiarySuicide2
Command = SWITCH_WEAPON
WeaponSlot = SECONDARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT SCRIPT_ONLY
TextLabel = CONTROLBAR:SuicideAttack
ButtonImage = SUSuicideAttk
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASuicideAttack
End[/code]
However, the Demo Rebel still uses the default commandSet.
In the skirmish scripts, instead of using the normal tertiarySuicide button, it uses this one. I'm not exactly sure why (the button confuses my little brain).
Does this button switch weapons to the tertiarySuicide thus blowing up the rebel? Which would mean it can't be done in vanilla Zero Hour. (crashes)
The script for the Ambush looks like this
[code]*** IF ***
True.
*** THEN ***
Recruit an instance of Team 'GLA Rebel Ambush Team', maximum recruiting distance (feet):9999.00.
Have Team 'GLA Rebel Ambush Team' use Attack priority set 'Demo Rebel Ambush Priority'.
Team 'GLA Rebel Ambush Team' use Ability 'Demo_Command_TertiarySuicide2'.
Team 'GLA Rebel Ambush Team' begins hunting.[/code]
The Ambush team itself doesn't have any scripts set in the Teams tab.
Thanks in advance.
Also random side question I'm going to sneak in here so I don't need to post another thread.
Do you take map/mission submissions for Zero Hour mods? (Shockwave mainly). Im sure it's been said around here somewhere, and that I probably read it, but I can't remember. If so, details on exactly how to do so would be appreciated.
Posted by: Zatsupachi - Wednesday, May 4, 2016 9:35:38 PM
It's an AI-only script button.
It is the same way how the AI upgrades to MOAB.
Yeah since Generals/Zero Hour AI mainly relies on a series of if-then statements.
This sort of shenanigans is used to make auto-filled bunkers(bunkers with infantry inside already so you don't have to make bunker teams).
Posted by: Gameanater - Thursday, May 5, 2016 8:55:19 PM
You may want to give AEI a PM on Moddb or an email for inquiries on that. This is slightly beyond my understanding, sadly.
[quote=ComradeGeneral;140103]Also random side question I'm going to sneak in here so I don't need to post another thread.
Do you take map/mission submissions for Zero Hour mods? (Shockwave mainly). Im sure it's been said around here somewhere, and that I probably read it, but I can't remember. If so, details on exactly how to do so would be appreciated.[/quote]
Yeah I think we do, just make sure to specify that it's for a mod and what mod it is. One time a person did not do that (and it was a 5-minute-made map anyway) for a Pro:Gen map.