RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hello,

I'm making a mission map, where one AI attacks another.

For example, China units attacks American patriot turrets. When the turret is destroyed, infantry come out of that patriot turret. But the China attacking units first destroy the other patriot turrets, and THEN, when all turrets are destroyed, they start attacking the left over American infantry that came out of the patriot turrets.

How can I make the China units attack the infantry coming out of the turrets as well, or in other words, make the China units attack everything on their path? They should destroy everything in range of them, with closest units FIRST.

Is that possible to script?

Thanks.
Sponsor
Unknown Editor
8 years ago
Well , I suppose You'll need to use "Team/Hunt/Set to Hunt" instead of "Team/Attack/Set to Attack -- another Team"
as I suppose they do what you said when you use Attack scripts instead of Hunt .

But please for the sake of your map , remember to add sub-scripts and set your team behavior like :
On Create : CHI_Path_attack_america01
On Enemy Sighted : Default_Hunt
On All Clear : CHI_Path_attack_america01

and well , decrease your map Lags ; as you know "Hunt" takes much performance ...

I hope that's the right answer

Good Luck 😉👍
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
AdrianeMapMaker
8 years ago
Or set a attack priority which infantry and base defenses are same in value
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




SkyMix_RMT
8 years ago
If possible, avoid using attack/hunt scripts and instead make waypaths to the base you want the team to attack and set the teams behaviour to agressive. Then make the team move through the waypaths On Create and On All Clear in the behaviour tab.

The hunt/attack scripts will not always attack the closest enemy, and sometimes they will chase a running unit instead of attacking the ones that are attacking them. Also hunt/attack scripts can cause massive lag spikes due to pathfinding around various obstacles/mountains.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord