Scenario - Spawn Roach at Point X, use trigger to Burrow it. (If I spawn a Burrowed Roach it will not animate the dirt trail when it moves). Order burrowed Roach to attack Point Y. Any enemy targets en-route, unborrow and attack. If still alive after the attack, burrow an continue to attack Point Y.
So I have accomplished all of the above except the last part.. burrow after the attack.
I have done the following steps...
To allow Roach to Burrow by changing Burrow Requirements
To allow Roach to Burrow after successful Attack ???
- I need help here..!!! What settings do I need in the Burrow Ability? If impossible using Auto Cast, then with trigger? What would the trigger look like? I have see this scenario work in the "Desert Strike" Map, so apparently it's possible. Any help greatly appreciated... Thx
Update - Is it possible to have the Roach (Burrow) Ability... Auto Cast if there are no units around it? Example... Burrow if you don't see any Unit(s) with X range of your position?
2nd Update - Figured out how to use triggers to do this... One trigger to catch when the roach acquires the target to issue an order for it to stop (otherwise, it would just walk on its way after the attack to original attack point). Second trigger to catch when the Roach becomes Idle to reissue a burrow and attack order. Still, if anyone knows how to make the Burrow ability work like this with Auto Cast... would greatly appreciate the info... Thx.
I would just make the burrow/unburrow automatic and have an Enumerate Area validator preventing it if there are enemies/no enemies.
Or do you mean attack once and burrow? Im that case you need to add a Set effect after missile impact that does the usual Damage effect and an Issue Order effect that orders the caster to burrow.
I would just make the burrow/unburrow automatic and have an Enumerate Area validator preventing it if there are enemies/no enemies.
Or do you mean attack once and burrow? Im that case you need to add a Set effect after missile impact that does the usual Damage effect and an Issue Order effect that orders the caster to burrow.
Much appreciate the help DrSE. The behavior of Roach - Unburrow seems to work fine just by turning Auto Cast On. It will surface based on ACM and ACR settings. However the Burrow Auto Cast is still giving me trouble. After setting the Roach - Burrow Stats > Flags to Automatic and Ability > AC Validators to NoEnemiesNearby... the roach will burrow at game start. If I start with a burrowed roach it will unborrow if target is in range but immediately burrows after it surfaces... then repeats the process after 3 seconds. In theory, NoEnemiesNearby would seem to prevent the Auto Cast but its not. Just by setting the Automatic Flag, the roach dives at game start even with no validators added. It's really kicking my butt.
And no... I'm trying to get the roach to attack all enemies in the area while its surfaced... then dive after all enemies are dead within the area and continue to attack point.
No enemies nearby returns true if there are 0 hostiles nearby. You want this on your burrow while the unburrow has enemies nearby.
Just can't seem to get this working... With or without Auto Cast Validators, having "Automatic" selected will cause the ability to activate... both for Burrow and Unborrow. I'm using a standard starting map to try and get this working. Nothing else has been touched except removing the requirement for Burrow ability and checking Automatic. I'm not entirely sure what "automatic" even means but seems to be overriding everything I try.
Even tried ignoring "automatic" altogether, to get Auto Cast to work... Auto Cast works properly for Unburrow when ACM and ACR are entered. The Burrow is the one really kicking my donkey, as Auto Cast seems to want at least one target to evaluate in order to work.
Update - To even get the Auto Cast to work for Burrow, there must be at least 1 entered in Auto Cast Minimum and range value for Auto Cast to test. Leaving these blank, all Auto Cast Validators will be ignored. Having said that, I have a test unit that is the intended kill target with a range of like 50... so it meets the requirement to have Auto Cast look at validators. Some validators work, but the NoEnemiesNearby definitely does not. Even tho there are "no enemies nearby" (0, 360, 0, 6, 0, (None), defaults) it seems to return false and Burrow never activates using this validator.
"Not Attacking and not Burrowed" (Combine)
- Caster Not Attacking
- Not Burrowed
- type: AND
"Attacking and Burrowed"
- Caster Is Attacking
- Is Burrowed
- type: AND
Create a new switch effect:
"Roach Switch"
Case 0 - Order Unburrow Validator: Attacking and Burrowed
Default - Order Burrow: Not Attacking and Not Burrowed
Create a new behavior - "Roach Autoburrow"
Set the Periodic effect to "Roach Switch"
Set the period durations to something low like 0.1
Add the behavior to the roach.
done.
This might need a little tweaking, but these are the basic steps. I use the same thing in a reworked version of spidermines (Although mine are based on Has Orders, to include move commands).
Note: I've tried all the combinations for auto-burrow (i.e. automatic flag, autocast, etc etc. None of it gives the desired result of Unburrow when attacking)
If you want it to unburrow when moving, the burrowed version MUST have a move speed, even if it is something like 0.117
If you just want it to unburrow when attacking (and not reburrow when done), you can skip a few steps.
I'll take a deeper look tomorrow.. just at my wits end atm. I'll also have to look into "issue order effects" as I've not played with those yet.
Like mentioned before, getting the roach to Unburrow and attack seems to work just fine using Auto Cast. Just need to enter the minimum number of targets and the range. Adding a weapon was not required, just giving the burrowed roach a speed and adding the attack ability worked fine.
My major hurdle is once the roach is finished attacking, is getting Auto Cast to burrow the roach. Thus far, the "NoEnemiesNearby" validator is a total bust, as I can't get it to return true for some reason. Oddly enough, "EnemiesNearby" seems to be working just fine... but if I change its parameter to Equal To 0, (and there are none) it too fails to return True.
Adding "Caster Not Attacking" validador kinda works, but will only burrow the roach when it gets to point where I issued the roach to attack. Apparently, "Caster Not Attacking" valadator does not get checked until after the unit is at its final destination.
I used a similar system for my zerg gate. Maybe it will help.
Well DrSE, I feel like the Scare Crow from the Wizard of Oz and wish I had only 1/10th your brain. My failure was completely around my lack of knowledge of Ability Validators and the Enumerated Validator itself. Your original suggestion was ultimately as easy as you stated once I understood what I was doing. My roach is behaving just like I want it to and has survived the Raid I was about to spray on this unit and move on.
What I was doing wrong, and maybe this will help some other noobs when it comes to using the "Automatic" flag and the Enumerated Validator:
- I kept trying to plug NoEnemiesNearby into the Auto Cast Validators parameter instead of the Validator Array one. I didn't notice that until I saw your map. Although the help text seems to say the same thing for both, Validator Array appears directly tied to the Automatic flag somehow.
- The default NoEnemiesNearby has Validator Compare set to Greater Than and the Search Count is set to 0. This appears wrong, as it would only return True if there are enemies nearby and seems backwards. Changing to Less Than with a Search Count of 1 not only works, but makes sense with this validator.
- When using Automatic, Auto Cast and Auto Cast Initially On does not need to be selected.
- I kept thinking that the Search Areas - Compare parameter was tied to the Search Count. Its the Validator - Compare parameter that is tested against Search Count. I never noticed this until I scrubbed through the data from the map you provided. Under your "no zerg nearby" validator, you have Compare Less Than checking against the constant 1. Setting Compare - Equal To checking against the constant 0, seems to accomplish the same thing. Using the second option, would there be a problem down the road or is it just style that when your testing for 0 you test "less than" the value of 1?
Can't thank you enough for assisting with this DrSE, and to ckS for his suggestion too. Although I worked on this for 3 days to get it to work, I've learned a lot more about things I did not know and will be able to use them in other aspects of my map too. BTW, your Zerg Gate is really cool. I think you missed your calling to be working with Blizzard directly (maybe you do, I don't know). :-)
Scenario - Spawn Roach at Point X, use trigger to Burrow it. (If I spawn a Burrowed Roach it will not animate the dirt trail when it moves). Order burrowed Roach to attack Point Y. Any enemy targets en-route, unborrow and attack. If still alive after the attack, burrow an continue to attack Point Y.
So I have accomplished all of the above except the last part.. burrow after the attack.
I have done the following steps...
To allow Roach to Burrow by changing Burrow Requirements
- Abilities > Roach - Burrow (Roach) > Ability > Ability Commands - Morph > Execute > Commands - Requirements > Set to (None)
To allow Burrowed Roach to Move
- Units > Roach (Burrowed) > Movement > Speed > Set Speed
To allow Burrowed Roach to Attack Move
- Units > Roach (Burrowed) > Ability > Abilities > Add Value (+X) > Ability > Add Attack
To allow Burrowed Roach to Auto surface and attack enemy
- Abilities > Roach - UnBurrow (Roach) > Ability > Ability Commands - Morph > Execute > Commands - Flags > Check Allow Self Cast > - Stats > Flags > Check Auto Cast - Stats > Flags > Check Auto Cast > Check Auto Cast Initially On
To allow Roach to Burrow after successful Attack ???
- I need help here..!!! What settings do I need in the Burrow Ability? If impossible using Auto Cast, then with trigger? What would the trigger look like? I have see this scenario work in the "Desert Strike" Map, so apparently it's possible. Any help greatly appreciated... Thx
Update - Is it possible to have the Roach (Burrow) Ability... Auto Cast if there are no units around it? Example... Burrow if you don't see any Unit(s) with X range of your position?
2nd Update - Figured out how to use triggers to do this... One trigger to catch when the roach acquires the target to issue an order for it to stop (otherwise, it would just walk on its way after the attack to original attack point). Second trigger to catch when the Roach becomes Idle to reissue a burrow and attack order. Still, if anyone knows how to make the Burrow ability work like this with Auto Cast... would greatly appreciate the info... Thx.
I would just make the burrow/unburrow automatic and have an Enumerate Area validator preventing it if there are enemies/no enemies.
Or do you mean attack once and burrow? Im that case you need to add a Set effect after missile impact that does the usual Damage effect and an Issue Order effect that orders the caster to burrow.
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
Much appreciate the help DrSE. The behavior of Roach - Unburrow seems to work fine just by turning Auto Cast On. It will surface based on ACM and ACR settings. However the Burrow Auto Cast is still giving me trouble. After setting the Roach - Burrow Stats > Flags to Automatic and Ability > AC Validators to NoEnemiesNearby... the roach will burrow at game start. If I start with a burrowed roach it will unborrow if target is in range but immediately burrows after it surfaces... then repeats the process after 3 seconds. In theory, NoEnemiesNearby would seem to prevent the Auto Cast but its not. Just by setting the Automatic Flag, the roach dives at game start even with no validators added. It's really kicking my butt.
And no... I'm trying to get the roach to attack all enemies in the area while its surfaced... then dive after all enemies are dead within the area and continue to attack point.
No enemies nearby returns true if there are 0 hostiles nearby. You want this on your burrow while the unburrow has enemies nearby.
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
Just can't seem to get this working... With or without Auto Cast Validators, having "Automatic" selected will cause the ability to activate... both for Burrow and Unborrow. I'm using a standard starting map to try and get this working. Nothing else has been touched except removing the requirement for Burrow ability and checking Automatic. I'm not entirely sure what "automatic" even means but seems to be overriding everything I try.
Even tried ignoring "automatic" altogether, to get Auto Cast to work... Auto Cast works properly for Unburrow when ACM and ACR are entered. The Burrow is the one really kicking my donkey, as Auto Cast seems to want at least one target to evaluate in order to work.
Update - To even get the Auto Cast to work for Burrow, there must be at least 1 entered in Auto Cast Minimum and range value for Auto Cast to test. Leaving these blank, all Auto Cast Validators will be ignored. Having said that, I have a test unit that is the intended kill target with a range of like 50... so it meets the requirement to have Auto Cast look at validators. Some validators work, but the NoEnemiesNearby definitely does not. Even tho there are "no enemies nearby" (0, 360, 0, 6, 0, (None), defaults) it seems to return false and Burrow never activates using this validator.
Actually, this is rather easy.
Add the roach weapon to the burrowed version
Create two new issue order effects
"Order Unburrow"
Ability Command: Unburrow
- Check Preempt
"Order Burrow"
Ability Command: Burrow
- Check preempt
Add a few validators
"Is Burrowed" (Unit Type check)
- Caster
- Flag: Buried Required
"Not Burrowed" (Unit type check)
- Caster
- Flag: Buried Excluded
"Not Attacking and not Burrowed" (Combine)
- Caster Not Attacking
- Not Burrowed
- type: AND
"Attacking and Burrowed"
- Caster Is Attacking
- Is Burrowed
- type: AND
Create a new switch effect:
"Roach Switch"
Case 0 - Order Unburrow Validator: Attacking and Burrowed
Default - Order Burrow: Not Attacking and Not Burrowed
Create a new behavior - "Roach Autoburrow"
Set the Periodic effect to "Roach Switch"
Set the period durations to something low like 0.1
Add the behavior to the roach.
done.
This might need a little tweaking, but these are the basic steps. I use the same thing in a reworked version of spidermines (Although mine are based on Has Orders, to include move commands).
Note: I've tried all the combinations for auto-burrow (i.e. automatic flag, autocast, etc etc. None of it gives the desired result of Unburrow when attacking)
If you want it to unburrow when moving, the burrowed version MUST have a move speed, even if it is something like 0.117
If you just want it to unburrow when attacking (and not reburrow when done), you can skip a few steps.
@ckSynergy: Go
I'll take a deeper look tomorrow.. just at my wits end atm. I'll also have to look into "issue order effects" as I've not played with those yet.
Like mentioned before, getting the roach to Unburrow and attack seems to work just fine using Auto Cast. Just need to enter the minimum number of targets and the range. Adding a weapon was not required, just giving the burrowed roach a speed and adding the attack ability worked fine.
My major hurdle is once the roach is finished attacking, is getting Auto Cast to burrow the roach. Thus far, the "NoEnemiesNearby" validator is a total bust, as I can't get it to return true for some reason. Oddly enough, "EnemiesNearby" seems to be working just fine... but if I change its parameter to Equal To 0, (and there are none) it too fails to return True.
Adding "Caster Not Attacking" validador kinda works, but will only burrow the roach when it gets to point where I issued the roach to attack. Apparently, "Caster Not Attacking" valadator does not get checked until after the unit is at its final destination.
I used a similar system for my zerg gate. Maybe it will help.
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
Well DrSE, I feel like the Scare Crow from the Wizard of Oz and wish I had only 1/10th your brain. My failure was completely around my lack of knowledge of Ability Validators and the Enumerated Validator itself. Your original suggestion was ultimately as easy as you stated once I understood what I was doing. My roach is behaving just like I want it to and has survived the Raid I was about to spray on this unit and move on.
What I was doing wrong, and maybe this will help some other noobs when it comes to using the "Automatic" flag and the Enumerated Validator:
- I kept trying to plug NoEnemiesNearby into the Auto Cast Validators parameter instead of the Validator Array one. I didn't notice that until I saw your map. Although the help text seems to say the same thing for both, Validator Array appears directly tied to the Automatic flag somehow.
- The default NoEnemiesNearby has Validator Compare set to Greater Than and the Search Count is set to 0. This appears wrong, as it would only return True if there are enemies nearby and seems backwards. Changing to Less Than with a Search Count of 1 not only works, but makes sense with this validator.
- When using Automatic, Auto Cast and Auto Cast Initially On does not need to be selected.
- I kept thinking that the Search Areas - Compare parameter was tied to the Search Count. Its the Validator - Compare parameter that is tested against Search Count. I never noticed this until I scrubbed through the data from the map you provided. Under your "no zerg nearby" validator, you have Compare Less Than checking against the constant 1. Setting Compare - Equal To checking against the constant 0, seems to accomplish the same thing. Using the second option, would there be a problem down the road or is it just style that when your testing for 0 you test "less than" the value of 1?
Can't thank you enough for assisting with this DrSE, and to ckS for his suggestion too. Although I worked on this for 3 days to get it to work, I've learned a lot more about things I did not know and will be able to use them in other aspects of my map too. BTW, your Zerg Gate is really cool. I think you missed your calling to be working with Blizzard directly (maybe you do, I don't know). :-)
Nope, I am a biologist by trade.
Also if you thought that gate was impressive you should see the other stuff I have done/am working on.
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