1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Channels an Active spell if lvl 2 or more

Discussion in 'Triggers & Scripts' started by The_Spellweaver, Feb 19, 2014.

  1. The_Spellweaver

    The_Spellweaver

    Joined:
    Feb 20, 2013
    Messages:
    95
    Resources:
    2
    Models:
    2
    Resources:
    2
    Whenever I set the ability level to 2 or more, when I cast it, it channels and I can't stop the channel.

    • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Endure --------If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Paladin for (Entering unit)) Greater than or equal to 2
        • SpellString[((Owner of EnteringUnit) Food used)] Equal to WWRG
      • Then - Actions
        • Unit - Remove ActiveSpell[((Owner of (Triggering unit)) Food used)] from (Triggering unit)
        • Unit - Add Endure to (Entering unit)
        • Unit - Set level of Endure for EnteringUnit to (Level of Determination Mastery for EnteringUnit)
        • Set ActiveSpell[((Owner of EnteringUnit) Food used)] = Endure
        • Game - Display to (All players) the text: (String((Level of Endure for (Triggering unit))))
      • Else - Actions

    However, if I raise it by another trigger, it works normally

    • Ability level up
      • Events
        • Player - Player 1 (Red) types a chat message containing -allup as An exact match
        • Player - Player 2 (Blue) types a chat message containing -allup as An exact match
      • Conditions
      • Actions
        • Unit - Set level of ActiveSpell[((Triggering player) Food used)] for Hero[((Triggering player) Food used)] to ((Level of ActiveSpell[((Triggering player) Food used)] for Hero[((Triggering player) Food used)]) + 1)


    But, if I run this trigger in the previous one, once or twice, it still doesn't work. The spell has unchecked "disable other abilities" and has 0.01 follow through time. I'm very confused. :vw_wtf:
     
  2. vypur85

    vypur85

    Joined:
    Jan 27, 2014
    Messages:
    158
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Can't see the whole trigger. Did you pause the unit?
    This usually happens when the unit is paused upon cast order.

    For the problem I mentioned, you can try replacing the channel to some other channeling ability like Starfall. Then again, it may not be what you want.

    Alternatively, the problem may be fixed if you set the cooldown time for your unit.
     
  3. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,253
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    maybe because you remove the spell before the channeling ends? I'm not pretty clear with what you are trying to do with that trigger..

    cool signature you have there :)
     
  4. The_Spellweaver

    The_Spellweaver

    Joined:
    Feb 20, 2013
    Messages:
    95
    Resources:
    2
    Models:
    2
    Resources:
    2
    @vypur85
    The cooldown is 0.
    I am not pausing the unit in any way, I want it to be cast normally like an aoe spell, no channeling.

    @.....
    Thanks :)

    Here is the spell trigger:
    • Endure
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Endure
      • Actions
        • Set TempPoint = (Target point of ability being cast)
        • Unit - Create 1 DummyCaster for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
        • Unit - Add DummyEndure to (Last created unit)
        • Unit - Set level of DummyEndure for (Last created unit) to (Level of Endure for (Triggering unit))
        • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror
        • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation(udg_TempPoint)


    Endure makes a dummy at the target location and casts roar which raises allies' armor.

    The add ability trigger does not have an event, it is run by another trigger, by stepping on a region and the rest of this trigger are all the same, just with other abilities as well.
    However, I am removing the ability after the finished cast:

    • Spell Removal
      • Events
        • Unit - A unit Finishes casting an ability
      • Conditions
        • (Ability being cast) Not equal to Summon Magic (novi)
        • (Ability being cast) Not equal to Summon Melee (novi)
        • (Ability being cast) Not equal to Summon Ranged (novi)
        • (Ability being cast) Not equal to Elem Mastery
        • (Ability being cast) Not equal to Learn Basic Fire Mastery
        • (Ability being cast) Not equal to Learn Basic Ice Mastery
        • (Ability being cast) Not equal to Learn Basic Lightning Mastery
      • Actions
        • Unit - Remove ActiveSpell[((Owner of (Triggering unit)) Food used)] from (Triggering unit)
        • Set ActiveSpell[((Owner of (Triggering unit)) Food used)] = No Ability
        • Set SpellString[((Owner of (Triggering unit)) Food used)] = <Empty String>


    I am using food used so I can use it for the player index number as I've found out that red and blue's index number are both 1
    No Ability is an ability which tells me that there is no ability active

    This isn't a channel spell, and it works fine when it's level 1, it also works fine when I raise it by the Ability lvl up trigger and it's lvl 2, it works perfectly fine, the problem is that it channels, all abilities' , commands' UI icons dissapear except for the passives'. That happens if I set it to the level of Det. Mast., it doesn't work, the casting hero starts channeling. Maybe I can try having a variable that counts the level of it throughout the game, maybe it'll work then.

    EDIT: I've found out an interesting thing, I've put a trigger 3 times with:
    • Unit - A unit Starts the effect of an ability
    • Unit - A unit Begins channeling an ability

    • Unit - A unit Begins casting an ability
    , and it didn't run when I cast the spell. It did run when there was no Determination Mastery ability present, and while it was level 1, even though every time I add the ability, I set it to the same level as the Det. Mast.
    I've come to think that it's the Object editor problem, but I deeply doubt that, all fields are same in all levels except for the cast range and aoe
     
    Last edited: Feb 19, 2014
  5. DysfunctionaI

    DysfunctionaI

    Joined:
    Mar 6, 2006
    Messages:
    281
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Isn't 'Follow Through Time' supposed to be 0 ?

     
  6. The_Spellweaver

    The_Spellweaver

    Joined:
    Feb 20, 2013
    Messages:
    95
    Resources:
    2
    Models:
    2
    Resources:
    2
    Follow through time is 0 and disable other abilties is false, even though it works normally on lvl 1, it starts an uninterruptable channel which lasts forever, It is not a state of casting or channeling though.
    I am now raising ability lvl by one(since lvl of spell is determined by lvl of another spell) and it works for level 2 just fine, haven't tried lvl 3 yet. Can't post triggers because I'm on mob.
     
  7. vypur85

    vypur85

    Joined:
    Jan 27, 2014
    Messages:
    158
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Surprisingly, the situation you mentioned mimics the pause/unpausing issue.
    It does exactly what you've described.

    Could it be some other interfering triggers?
     
  8. The_Spellweaver

    The_Spellweaver

    Joined:
    Feb 20, 2013
    Messages:
    95
    Resources:
    2
    Models:
    2
    Resources:
    2
    I found the problem!!! The level is set to 0! Thanks for your time vypur85 (you made me scour the trigges and I fixed it now) +rep :D