Posted by: SlimJax - Wednesday, July 18, 2012 7:03:39 PM
Hi. And ye as you can see from the subject, I have a question about AI to create custom teams. When I say create, I mean build, like vehicles from War Factory. I have managed to copy the scripting style of Generals Challenge (GC_) wich goes like this:
Team Rebels
2 GLAinfantryrebel
Automatically Reinforce Whenever Possible.
Team Members Are AI Recruitable
Team Created Once And Once Only
Execute Assiocated Actions
Priority: 600
Home Position: Waypoint 3
Condition: Condition (SCRIPT)
--> Behavior
On Create: Create (SCRIPT)
Intial Team Behavior: Agressive
Focus Single Target
--> Scripts
Condition (SCRIPT)
[S A n d] [E N H]
*** IF ***
True.
*** THEN ***
Null operation. (Does nothing.)
-----
Create (SCRIPT)
[S A n d] [E N H]
*** IF ***
True.
*** THEN ***
Team '' begins hunting using Ability 'Command_GLAInfantryRebelCaptureBuilding'.
---> Build List
GLA Barracks(Unlimited Rebuilds)
GLA Command Center (Already Built)(Unlimited Rebuilds)
GLA Supply Depot (Unlimited Rebuilds)
---> Player List
Player0002 (No Enemies) (AI Controlled)(Faction GLA)
Player0001 (No Enemies) (Faction USA)
PlyCivilian (No Enemies) (Faction Civilian)
-----------------
Back to the topic. The AI does build the structures from Build List, but after that he does not produce the rebel team nor workers.
I'd appreciate help. No mods were applied.
Sorry for bad english I'm from Finland and I am only fifteen years old.
Posted by: i^love^mixery - Wednesday, July 18, 2012 11:15:24 PM
not bad for fifteen years, both the english and the understanding how building teams works.
but i cant do anything about this unless i see the map. you will have to attach it. ill have to do some testing myself since i am not really used to scripting AI.
Posted by: BR-Alexandre - Thursday, July 19, 2012 10:10:39 AM
[quote=SlimJax;125118]
--> Scripts
Condition (SCRIPT)
[S A n d] [E N H]
*** IF ***
True.
*** THEN ***
Null operation. (Does nothing.)
-----
Create (SCRIPT)
[S A n d] [E N H]
*** IF ***
True.
*** THEN ***
Team '' begins hunting using Ability 'Command_GLAInfantryRebelCaptureBuilding'.
[/quote]
the 1st script must be set as a condition to make a team. the AI should make it whenever possible. the 2nd scripts must be put in behavior tab of a team, in this case, of rebels.
according to your post the scripts are fine but if they don't build the team maybe you put wrong unit in the team, like player is GLA stealth and you put toxic rebels as team members.one thing i can tell, if they don't build the team, the problem to be fixed is in this area...
for the workers, make the team and set no behavior, condition or priority just create the team and put some workers on it.
Posted by: i^love^mixery - Thursday, July 19, 2012 10:18:30 AM
he did that correctly already, BR-Alexandre. i will take a look into it if you attach the map, SlimJax.
Posted by: SlimJax - Thursday, July 19, 2012 11:02:15 AM
Thanks for all who replied. Here is the map as attachment. [ATTACH]1138[/Attach]
Posted by: i^love^mixery - Thursday, July 19, 2012 12:44:42 PM
took me some time, now i got it:
"Team created once and only once" is marked, that causes the error.
because of this thing the comp attempts to build the team ONCE and that is at the start of the game because of the condition (= true) but he fails to build it because he has no barracks yet.
just deselect "Team created once and only once" for this team0002 and it works fine :)
Posted by: SlimJax - Thursday, July 19, 2012 1:39:41 PM