I have a unit with two attacks (through a Create Persistent) with a period duration of 0.5 and 1.0 on a weapon with a Duration of 2.5s. It all works fine and in sync with the model animation, but the problem comes when the first attack kills the target. Then the unit changes target and stares at it for 1.5s because weapon is on cooldown.
Is it possible to have the second attack acquire a different target if the first one is dead? Or perhaps, is it possible to reset the cooldown should the first attack kill the target?
Thank you for the reply, it works perfectly, except for one thing: when the first target is dead the animation stops, and the unit does not even turn towards the intended target. Any ideas?
I tried setting the Closing Full flag on the actor animation, but that didn't change anything (I thought it would force the animation to go on until the end).
Edit: I tried to tie the second part of the animation to the SearchEffect. And that works, except that it still doesn't play the animation towards the target, and it also plays the animation even if no target is found with the search effect.
Adjust the events of the Unit actor or issue order the unit to attack the new target.
Use a term that uses an enumerate area validator so it only is allowed if there is a valid target for the search. Else use the effect just after the search to trigger the event.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Thanks a lot. I ended up adjusting the Events on the Actor with an Enumerate Area validator term as you suggested. In order to sync up the damage with the actor animation I used a Create Persistent effect on the Search in order to create a slight delay. So, all of this works like charm.
Unfortunately, the facing issue doesn't work reliably, even when using an Issue Order: Attack effect on the Search. Not the biggest of deals, but if you have any idea why, I would certainly appreciate that.
I have a unit with two attacks (through a
Create Persistent
) with a period duration of 0.5 and 1.0 on a weapon with aDuration
of 2.5s. It all works fine and in sync with the model animation, but the problem comes when the first attack kills the target. Then the unit changes target and stares at it for 1.5s because weapon is on cooldown.Is it possible to have the second attack acquire a different target if the first one is dead? Or perhaps, is it possible to reset the cooldown should the first attack kill the target?
Could have a switch effect that if the target is dead it uses a search area effect to find another.
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
Thank you for the reply, it works perfectly, except for one thing: when the first target is dead the animation stops, and the unit does not even turn towards the intended target. Any ideas?
I tried setting the
Closing Full
flag on the actor animation, but that didn't change anything (I thought it would force the animation to go on until the end).Edit: I tried to tie the second part of the animation to the
SearchEffect
. And that works, except that it still doesn't play the animation towards the target, and it also plays the animation even if no target is found with the search effect.Adjust the events of the Unit actor or issue order the unit to attack the new target.
Use a term that uses an enumerate area validator so it only is allowed if there is a valid target for the search. Else use the effect just after the search to trigger the event.
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
Thanks a lot. I ended up adjusting the Events on the Actor with an Enumerate Area validator term as you suggested. In order to sync up the damage with the actor animation I used a Create Persistent effect on the Search in order to create a slight delay. So, all of this works like charm.
Unfortunately, the facing issue doesn't work reliably, even when using an Issue Order: Attack effect on the Search. Not the biggest of deals, but if you have any idea why, I would certainly appreciate that.
The Modify Unit effect can alter cooldowns, maybe that would 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