Hello everyone, I’m having a problem with one of the abilities in my map.
This ability is called “Sprinting”, it is a bearform-based ability which allows a unit (called Rifleman) to switch to a state where he has +100 ms, but has no attack and is unable to cast spells.
Removing his attack was simple enough. My solution to preventing him from casting spells was to remove those undesired abilities (Rocket-propelled Grenade, Flashbang) after he casted Sprinting, while leaving the “Turn-off Sprinting” ability to allow him to switch back to his regular self.
This seemed to work well enough, especially as the abilities automatically restored themselves when he switched back to his non-sprinting form.
But this created a huge bug, in that ability cooldowns are reset when an ability is removed and then added again. As such, players were able to continuously cast spells by toggling between sprint and non-sprint.
My second idea was to get an enemy dummy caster to permanently soul-burn (with only the silence effect) the Rifleman while he is sprinting. But I didn’t bother to try this as I guessed this would prevent him from switching back to non-sprint.
For now, I’m using a trigger to issue a “Stop” command when the Rifleman tries to cast any of the undesired abilities while he is in Sprint form. But this could be confusing to players who see the cast animation but no spell effects.
So I need to ask if I can cause one of those spell messages to appear:
eg. When you try and cast storm bolt on a building. “Cannot target structures”
So that the players are notified when they try and cast a spell when sprinting, something like “Cannot use this ability while sprinting”
Also, if anyone has a better solution on how to disable certain abilities when in bearform (sprinting), please share it with me, any ideas are really appreciated!
Thanks very much for your time people, I know it was a long post
This ability is called “Sprinting”, it is a bearform-based ability which allows a unit (called Rifleman) to switch to a state where he has +100 ms, but has no attack and is unable to cast spells.
Removing his attack was simple enough. My solution to preventing him from casting spells was to remove those undesired abilities (Rocket-propelled Grenade, Flashbang) after he casted Sprinting, while leaving the “Turn-off Sprinting” ability to allow him to switch back to his regular self.
This seemed to work well enough, especially as the abilities automatically restored themselves when he switched back to his non-sprinting form.
But this created a huge bug, in that ability cooldowns are reset when an ability is removed and then added again. As such, players were able to continuously cast spells by toggling between sprint and non-sprint.
My second idea was to get an enemy dummy caster to permanently soul-burn (with only the silence effect) the Rifleman while he is sprinting. But I didn’t bother to try this as I guessed this would prevent him from switching back to non-sprint.
For now, I’m using a trigger to issue a “Stop” command when the Rifleman tries to cast any of the undesired abilities while he is in Sprint form. But this could be confusing to players who see the cast animation but no spell effects.
So I need to ask if I can cause one of those spell messages to appear:
eg. When you try and cast storm bolt on a building. “Cannot target structures”
So that the players are notified when they try and cast a spell when sprinting, something like “Cannot use this ability while sprinting”
Also, if anyone has a better solution on how to disable certain abilities when in bearform (sprinting), please share it with me, any ideas are really appreciated!
Thanks very much for your time people, I know it was a long post