Temporarily disabling abilities

Kiido

New Member
Reaction score
2
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 :)
 
If you wish to sometimes disable an ability, you can do this:
Create a new dummy unit. This unit will not do anything, the only important thing is its name as seen in the game. In your case, you'd probably name it "Not sprinting".
Go to the ability you want disabled sometimes, Techtree->Requirements, and add the "Not Sprinting" unit to the required "Tech Items".

Your ability will now be disabled exactly when its owner does not also have "Not Sprinting" on the map.

So for example, on initialization you create the "Not Sprinting" unit for the player on some hidden location. Everytime he'll start sprinting, you remove the unit. Once he stops sprinting, you re-add it.

The ending result should look something like this:
screenshotnc.jpg


The cool thing about this method is that it greys out the ability when it's disabled, and it also still displays the cooldown on it.

Hope this helps :)
 
You can also use an upgrade.. Just set the upgrade to 0 when used and then 1 when not used.
 
Unfortunately, upgrades cannot be "downgraded" again, but it would certainly be way easier if they could be. That's why all the hassle with unit requirements is needed, instead.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top