klingondragon
9 years ago
I've decided to start mapping again.

I'm starting by getting my old maps up to scratch.
I have a map which has the player as the boss general VS vanilla USA, GLA, and China.
The AI builds and attacks as I want them to. Except my aircraft teams.
Neither helicopters nor planes build.

The script used is the same as for my other units:

[S A nd] [E N H]UScreate:
*** IF ***
    True.
    *AND*  Team '<This Team>' all exit  area 'US Base' (Surfaces Allowed: Ground or Air).
*** THEN ***
  Start building team Team '<This Team>'
Once they're created they should move off:

[S A nd] [E N ]oncreateair:
*** IF ***
    True.
*** THEN ***
   Team '<This Team>' change their attitude to Aggressive
  Have Team '<This Team>' wander along Waypoint Path 'Air'

Sponsor
zero hour mad map maker
9 years ago
Are the aircraft that you are building in the Team's building list? (Where teams are named and created).

I don't have my WB on hand (as I am using different computer and am out at the moment), but I know there's a better way to create teams and such than those scripts there.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
zero hour mad map maker
9 years ago
Well, I know if you're making a Generals' challenge sortish of map, one of the ways that makes the AI flow easily is creating a generic wave counter.

But, I should really have my World Builder instead of misleading you. I'll have to assist a bit later; unless someone else does or you figure out the problem.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
zero hour mad map maker
9 years ago


I have a map which has the player as the boss general VS vanilla USA, GLA, and China.

Originally Posted by: klingondragon 



This is pretty generic. So, may I ask, is this similar to a General's Challenge map in which the AI send waves of enemies at you and has their own base defenses. Or is this like an AOD map where the AI send waves of moving enemies. (Some AOD maps even have an AI base). So I'd like more of a feel as to what this mission is before I spend some time on the issue at hand.

And if it is a General's Challenge type of map, then I assumed correctly.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
9 years ago
It's neither. It's like the campaign missions. It shouldn't matter what kind of map of is. Only that I'm trying to build the team rather than spawn it.
zero hour mad map maker
9 years ago
Just upload the map for me to take a look at it. It'll be quicker that way 😉


Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
9 years ago
I'll upload in the morning. My laptop is off and I shouldn't even be awake now.
zero hour mad map maker
9 years ago
Okay! Yeah it's like past midnight in UK..... only 6:16pm here lol xD.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
zero hour mad map maker
9 years ago
Alright! I found the problem(s).

UserPostedImage

The reason the USA AI wasn't building the Aircraft was that this script basically said:

"This Team must exit the USA's exit area US Base"

Well, this script is telling the game that the USA Aircraft team must exit the area then create the team once the Aircraft have left the US Base. Well, this simply will never happen because the Aircraft team cannot leave the area if they haven't even been created yet.

So to fix the issue on the script delete the *AND* statement. I wasn't even quite sure why it was in there in the first place. I've never seen a True and an AND in the same condition xD.

I also changed the Oncreate script to say this:

*** IF ***
Team 'USA Air' has been created.
*** THEN ***
Team '' change their attitude to Aggressive
Have Team '' wander along Waypoint Path 'Air'




The next issue was on your edit teams list.

UserPostedImage

You just simply forgot to check "Team members are AI Recruitable."



And with these changes the USA AI now builds them and attacks with them! 😉

UserPostedImage
UserPostedImage

I have also attached the fixed map for ya. 👍   All The Factions Unite(fixed).zip (17kb) downloaded 12 time(s).
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
9 years ago
Your first thing shouldn't be a problem (one of the Humvees starts on that team and as soon as the game starts it leaves the area).
That second one, I'll give it a try on my own version.
zero hour mad map maker
9 years ago
It is actually. Only checking the AI Recruitable will NOT fix it. Trust me I tried that before I looked at the scripts. Nothing.

It'll be a waste of time if I try to explain it to you because you'll just deny it. Besides that's why I much prefer in WB to set scripts like these:

(Set Waves counter)
*** IF ***
Flag named '_GAME_ON' IS TRUE
*** THEN ***
Add 1 to counter '_ESCALATION'

(First Wave)
*** IF ***
Counter '_ESCALATION' IS Greater Than or Equal To 60
*** THEN ***
Null operation. (Does nothing.)

(Second Wave)
*** IF ***
Counter '_ESCALATION' IS Greater Than or Equal To 120
*** THEN ***
Null operation. (Does nothing.)

Then put the teams production condition script to "Second Wave" or "First Wave"

Then have them follow these actions:

** IF ***
True.
*** THEN ***
Team '' executes Script 'GLA Attack Center Orders' sequentially.

*** IF ***
True.
*** THEN ***
Team '' load into transports.
Have Team '' move to the start of enemy path 'Center'.
Have Team '' approach the enemy using path 'Center', as a team is TRUE
Team '' unload.
Team '' attack anything in area 'PlayerArea'

You can also set priorities on the team list too, and also add in some attack priorities as well:

*** IF ***
True.
*** THEN ***
For Attack priority set 'GLA Default Priority' set the priority of object type 'Base Defenses' to 50
For Attack priority set 'GLA Default Priority' set the priority of object type 'Tanks' to 45
For Attack priority set 'GLA Default Priority' set the priority of object type 'Aircraft' to 40
For Attack priority set 'GLA Default Priority' set the priority of object type 'Infantry' to 40
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaWarFactory' to 30
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaAirfield' to 30
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaBarracks' to 30
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaStrategyCenter' to 30
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaParticleCannonUplink' to 55
For Attack priority set 'GLA Default Priority' set the priority of object type 'AmericaCommandCenter' to 10

This helps give the AI some strategy rather than "running and gunning" so to speak. But, I digress.

You know, it's ok to admit that you're not right all the time 😉.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
9 years ago
Well it worked for me. And I've had enough time to test it to my satisfaction and release it.
zero hour mad map maker
9 years ago
Good for you 😉
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
This is a Good Thread ,i Got Something New Knowledge Here Thanks.

By The way in Zero hour MMM Said

So to fix the issue on the script delete the *AND* statement. I wasn't even quite sure why it was in there in the first place. I've never seen a True and an AND in the same condition xD.

Originally Posted by: Zero Hour Mad Map Maker 



The WorldBuilder Scripts add this 'And' Statement Because The Script Assume those Scripts will be feasible or Will Be done ,InOrder or Not.

And Also The WorlBuilder Scripts Using 'Or' Statement... This Is Self explanatory ,This Will Cut The Relation about The other Scripts.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage