ComradeGeneral
10 years ago
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.
Sponsor
Gameanater
10 years ago
http://www.moddb.com/mods/advanced-ai-mod-for-zero-hour-improved-by-aei 
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
ComradeGeneral
9 years ago



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.

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

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
*** 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.

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.
Home is where the InnerPerimeter is.
Zatsupachi
9 years ago
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).
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Gameanater
9 years ago
You may want to give AEI a PM on Moddb or an email for inquiries on that. This is slightly beyond my understanding, sadly.

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.

Originally Posted by: ComradeGeneral 



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.
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Users browsing this topic