I have A.I. set up for some computer players and I want to trigger when they burrow/unburrow, but for some reason the A.I. is taking over and unburrowing whenever units are nearby. Anyone help?
There is a filed in data editor on zerg units "AI: Tactica AI" - removing value from this field should disable burrow/unburrow. There is also "Enable/Disable Script Control For Unit" trigger (and same for unit group): "If script control is enabled for a unit, the AI will not use that unit.".
Thanks tangocraft for another solid answer! Where are these "tactical AI Functions" created or governed? Can't find the tab in the data editor and would love to learn about these.
Sweet man thanks. I see the infestor has something called "AIThinkInfestor" and I wanted to edit it... but that data entry isn't there under "Tactical AI Data" and instead has entries like burrow up, burrow down, etc. AIThinkInfestor might be some sort of Set type effect somewhere else?
Also, if you know, how do Target Finds work? I know how to use Target Sorts but don't see how they are quite different, or how to use the Finds. Thanks :)
I've not used "Target Finds" and "Target Sorts" so I don't know how they work (just try out changing something and see how it works, I always do this).
Judging by name "AIThinkInfestor" is "Tactical AI Function" - a function from standard triggers library. Trigger functions is used for some units that has many castable abilities or require more difficult logic than simple autocast. You can write your own tactical AI function and set that field to the "script identifier" of that function (function real name in compiled galaxy script). Example AI Think Function (from "Mutators COOP" lib, "Heroes From The Storm" mutator):
CT_AmonHeroTychus_AIThink
Options: Action
Return Type: (None)
Parameters
------- All AI Think Triggers Must Have the following three parameters, no more no less
Owner = 0 <Integer>
AIUnit = No Unit <Unit>
NearByUnits = (Empty unit group) <Unit Group>
Grammar Text: CT_AmonHeroTychus_AIThink(Owner,AIUnit,NearByUnits)
Hint Text: (None)
Custom Script Code
Local Variables
Target = No Point <Point>
AbilityRange = 0.0 <Real>
AbilityDamage = 0 <Integer>
AbilityAoE = 0.0 <Real>
------- Comment
Score = 0 <Integer>
------- Comment
OrderVariable = No Order <Order>
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
(Number of Living units in NearByUnits) <= 0
((((Mutator Amon Tychus Toss Grenade, 0))) is valid for AIUnit) == False
(Cooldown of cooldown Abil/MutatorAmonTychusTossGrenade on ability Mutator Amon Tychus Toss Grenade on unit AIUnit) > 0.0
(AIUnit order list has an order with ability Mutator Amon Tychus Toss Grenade) == True
Then
General -Skip remaining actions
Else
------- Comment
Variable -Set AbilityRange = (Value of Abilities MutatorAmonTychusTossGrenade Range[0] for player Owner as an integer)
Variable -Set AbilityDamage = (Value of Effects MutatorAmonTychusTossGrenadeDamage Amount for player Owner as an integer)
Variable -Set AbilityAoE = (Real((Value of Effects MutatorAmonTychusTossGrenadeDamage AreaArray[0].Radius for player Any Player)))
Variable -Set Score = 1
------- Score is tallied per unit potentially hit, 1 point for Vitality >= Damage, otherwise (Vitality/Damage) points
Variable -Set Target = (Returns the best location to place and AOE attack on the group with the specified parameters ((Units in NearByUnits having alliance Enemy with Owner, with at most Any Amount), 3, AbilityDamage, Score, AbilityAoE, (Position of AIUnit), AbilityRange, c_unitAttributeNone))
------- Comment
General -If (Conditions) then do (Actions) else do (Actions)
If
Target != No Point
Then
AI -Suggests order ( Toss Shredder Grenade (Tychus) targeting Target) to AIUnit using tactical AI logic
General -Skip remaining actions
Else
Open the console and enter browse to oven the casc browser. You will find files called TactTerrAI, TactZergAI and TactProtAI. The tactical AI functions are in there. Target finds look for the best hypothetical location to use an ability for the tactical AI data to use.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have A.I. set up for some computer players and I want to trigger when they burrow/unburrow, but for some reason the A.I. is taking over and unburrowing whenever units are nearby. Anyone help?
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
There is a filed in data editor on zerg units "AI: Tactica AI" - removing value from this field should disable burrow/unburrow. There is also "Enable/Disable Script Control For Unit" trigger (and same for unit group): "If script control is enabled for a unit, the AI will not use that unit.".
Thanks tangocraft for another solid answer! Where are these "tactical AI Functions" created or governed? Can't find the tab in the data editor and would love to learn about these.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
This "Tactical AI" is like AI-only ability autocast. In data editor they are under "Advanced Game Data" - "Tactical AI Data" tab.
Sweet man thanks. I see the infestor has something called "AIThinkInfestor" and I wanted to edit it... but that data entry isn't there under "Tactical AI Data" and instead has entries like burrow up, burrow down, etc. AIThinkInfestor might be some sort of Set type effect somewhere else?
Also, if you know, how do Target Finds work? I know how to use Target Sorts but don't see how they are quite different, or how to use the Finds. Thanks :)
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
I've not used "Target Finds" and "Target Sorts" so I don't know how they work (just try out changing something and see how it works, I always do this).
Judging by name "AIThinkInfestor" is "Tactical AI Function" - a function from standard triggers library. Trigger functions is used for some units that has many castable abilities or require more difficult logic than simple autocast. You can write your own tactical AI function and set that field to the "script identifier" of that function (function real name in compiled galaxy script). Example AI Think Function (from "Mutators COOP" lib, "Heroes From The Storm" mutator):
Open the console and enter browse to oven the casc browser. You will find files called TactTerrAI, TactZergAI and TactProtAI. The tactical AI functions are in there. Target finds look for the best hypothetical location to use an ability for the tactical AI data to use.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg