I've created a Salvage ability that takes 15 seconds to channel.
I'm using the "prepare" time to simulate the channeling time, but I'm unable to cancel it.
I have the ability displaying the progress button on prepare, but when I click it it won't cancel it.
The unit that is casting the ability is a structure.
I tried canceling it by applying a stun behaviour, the unit continued to cast while being stunned.
I have Added Prepare to Cancelable and Removed prepare from Uninterruptible.
The ability has both an execute and a cancel command.
I saw your comment on another post, I tried disabling the ability with a trigger when the unit is attacked and it didn't work.
The ability did get disabled but the unit continued to cast.
I have nothing in the uninterruptible field like I stated in my post, so everything should be interruptible.
I also tried putting a smart validator for combat, to no avail.
Seems like the structure needs a Stop ability AND a command card icon for any other ability to be able to be canceled.
That sounds weird to me.
It's somewhat logical, I guess...
So in order to cancel an ability I have to add the Stop ability to the unit, with a trigger then, when I want to interrupt the cast, I have to Show the Stop command card button, then issue an order to the unit to Stop, then I have to hide it since I don't want it showing.
I have years experience with the editor and I can't come up with something better, but I really feel like it's probably something really simple that Im missing.
P.S. I also have to forcefully hide the Stop button for every such structure in the game once it's built.
I've created a Salvage ability that takes 15 seconds to channel.
I'm using the "prepare" time to simulate the channeling time, but I'm unable to cancel it.
I have the ability displaying the progress button on prepare, but when I click it it won't cancel it.
The unit that is casting the ability is a structure.
I tried canceling it by applying a stun behaviour, the unit continued to cast while being stunned.
I have Added Prepare to Cancelable and Removed prepare from Uninterruptible.
The ability has both an execute and a cancel command.
Use a buff to disable the ability like my demo map. Then there is the Ability: Uninterruptible field.
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
@DrSuperEvil: Go
Hey!
I saw your comment on another post, I tried disabling the ability with a trigger when the unit is attacked and it didn't work.
The ability did get disabled but the unit continued to cast.
I have nothing in the uninterruptible field like I stated in my post, so everything should be interruptible.
I also tried putting a smart validator for combat, to no avail.
I can send you the map if you would bother taking a look. I've been trying to make a stupid salvage ability since yesterday...
I have a slight suspicion it's from Renee's mod. I don't know how it works too well and it could be causing this, tho I doubt it.
The ability:
<CAbilEffectInstant id="SalvageRecruitmentBase22">
<Name value="SalvageRecruitmentBase/Name"/>
<AbilSetId value="SalvageRecruitmentBase"/>
<EditorCategories value="Race:Terran,AbilityorEffectType:Unit"/>
<Effect index="0" removed="1"/>
<PreEffectBehavior Behavior="SuppressInvisibility" Count="1"/>
<Flags index="BestUnit" value="1"/>
<Flags index="ChannelingMinimum" value="0"/>
<Flags index="WaitToSpend" value="0"/>
<Cost>
<Resource index="Terrazine" value="100"/>
<Charge Link="Abil/SalvageRecruitmentBase"/>
<Cooldown Link="Abil/SalvageRecruitmentBase" TimeStart="15" TimeUse="15"/>
</Cost>
<RefundArray index="Approach" value="0"/>
<RefundArray index="Prep" value="0"/>
<RefundArray index="Cast" value="0"/>
<SmartValidatorArray value="CasterNotInCombat"/>
<PrepTime value="15"/>
<ShowProgressArray index="Prep" value="1"/>
<ShowProgressArray index="Cast" value="1"/>
<CancelableArray index="Prep" value="1"/>
<CancelableArray index="Cast" value="1"/>
<ProgressButtonArray index="Prep" value="SalvageRecruitmentBase"/>
<CmdButtonArray index="Execute" DefaultButtonFace="SalvageRecruitmentBase" Requirements="CanBeSalvaged">
<Flags index="ShowInGlossary" value="1"/>
<Flags index="ToSelection" value="1"/>
</CmdButtonArray>
<CmdButtonArray index="Cancel" DefaultButtonFace="CmdCancel">
<Flags index="AllowSelfCast" value="1"/>
<Flags index="ShowInGlossary" value="1"/>
<Flags index="ToSelection" value="1"/>
</CmdButtonArray>
</CAbilEffectInstant>
Im thinking of remaking it using the inferstor's neural as a template. That should work.
Or Yamato.
Seems like the structure needs a Stop ability AND a command card icon for any other ability to be able to be canceled.
That sounds weird to me.
It's somewhat logical, I guess...
So in order to cancel an ability I have to add the Stop ability to the unit, with a trigger then, when I want to interrupt the cast, I have to Show the Stop command card button, then issue an order to the unit to Stop, then I have to hide it since I don't want it showing.
I have years experience with the editor and I can't come up with something better, but I really feel like it's probably something really simple that Im missing.
P.S. I also have to forcefully hide the Stop button for every such structure in the game once it's built.
You can issue order abilities not in the command card as long as the unit has the ability.
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
Good to know. I will try that tomorrow.
Edit: Doesn't work if I don't show the ability.