How to unresearch a research?

Discussion in 'JASS Zone' started by Insanewarlock, Aug 23, 2014.

  1. Insanewarlock

    Insanewarlock Active Member

    Ratings:
    +2 / 0 / -0
    So I need to downgrade an upgrade so that abilities dependent on it shall become unusable as they were before the upgrade. Help me please. Thanks in advance.


    PS
    One solution may be to make a building as a requirement instead of an upgrade and create and remove it when necessary but it's too clumsy is there an other way?
     
    Last edited: Aug 23, 2014
  2. jonas

    jonas Well-Known Member

    Ratings:
    +42 / 4 / -0
    Upgrades can not be downgraded.

    If the building option works, it seems to be the best way to do it.

    Here is another option:
    You could make two abilites, one usable and one not.
    When you want to switch, remove one and add the other.
     
  3. Insanewarlock

    Insanewarlock Active Member

    Ratings:
    +2 / 0 / -0
    For some reason when I add or remove spells from units game pauses for half a second or so, I'm making am multiplayer map so if everybody triggers this script at same period of time it won't be good. That's why I decided to make it this way in the first place. Is there a way to downgrade something using JASS?
     
  4. KaerfNomekop

    KaerfNomekop Swim, fishies. Swim through the veil of steel.

    Ratings:
    +609 / 0 / -0
    That normally only happens the first time round, when the game has to load the ability for the first time. Do it at the start of the game, then it shouldn't lag anymore.

    Not knowing what your conditions for enable/disable need to be, I would still go with the requirement method. You could use a dummy unit-type instead of a building for the requirement, then create one of that unit for your players when the ability needs to be enabled. This would work with a summoned unit to enable the ability for a set amount of time.
     

Share This Page