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. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    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.

detecting un-picked hero spells

Discussion in 'World Editor Help Zone' started by Bond009, Jan 3, 2012.

  1. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    896
    Resources:
    3
    Maps:
    3
    Resources:
    3
    i know you can detect spells a hero has with
    (Level of Wind Walk for (Picked unit)) Greater than 0

    but i dont think that detects spells the hero has that havent been picked/leveled up yet, is there a way?
     
  2. Mr_Bean

    Mr_Bean

    Joined:
    Feb 11, 2011
    Messages:
    1,823
    Resources:
    6
    Maps:
    2
    Spells:
    4
    Resources:
    6
    • (Level of Wind Walk for (Picked unit)) Equal to 0

    This will be true if the unit does not have the ability at all or if they haven't learned it yet.
     
  3. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    896
    Resources:
    3
    Maps:
    3
    Resources:
    3
    yeah that doesn't help me much though because i need to detect if the hero has the skill without them actually having it picked yet.
     
  4. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,894
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    • Conditions
      • (Unspent skill points of (Triggering unit)) Greater than 0

    or
    GetHeroSkillPoints(GetTriggerUnit()) > 0
     
  5. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    896
    Resources:
    3
    Maps:
    3
    Resources:
    3
    thanks, never noticed that before :p i gotta think how i can use that to help me detect if they have wind walk though, im sure it can help somehow though
     
  6. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,894
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    What you want to create at first place, maybe we can offer another way that you maybe missed.
     
  7. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    896
    Resources:
    3
    Maps:
    3
    Resources:
    3
    i need to detect if a hero has the ability wind walk even if they havent leveled it up yet
     
  8. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,894
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    It's for your CHF map?
    Well when you sell item/unit or whatever, when you pick WW as ability, do your things then :)
     
  9. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    Hero - Modify unspent skill points of Blademaster: Add 1 point
    Hero - Learn skill for Blademaster: Orc Blademaster - Wind Walk
    Level of Wind Walk for Blademaster == 1
    Unit - Remove Wind Walk from Blademaster

    PS when I saw this thread I thought you want to detect which skills were unlearned through use of tome of retraining, then I thought omg that's impossible, gotta tell him, and you should name threads like Detect Not Yet Learned Abilities. Just a friendly advice.
     
  10. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,542
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Alternativly you could use a hashtable to map such data in an efficient way. The problem is this does de-couple the script from the abilites so you will need to keep integrity manually.