Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline RV55  
#1 Posted : Saturday, February 10, 2018 10:16:12 AM(UTC)
RV55
Private
Joined: 1/28/2018(UTC)
Posts: 18

Was thanked: 1 time(s) in 1 post(s)
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
Offline Unknown Editor  
#2 Posted : Saturday, February 10, 2018 2:23:29 PM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
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 WinkThumb Up

Edited by user Saturday, February 10, 2018 2:24:34 PM(UTC)  | Reason: Not specified

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%
Offline AdrianeMapMaker  
#3 Posted : Tuesday, February 20, 2018 3:45:43 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
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





Offline SkyMix_RMT  
#4 Posted : Tuesday, February 20, 2018 5:57:35 AM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.