How to make a Hidden Ability

edited December 2015 in Drafts
"kelen_criminal_scum_lua"
{
    "AbilityBehavior"    "DOTA_ABILITY_BEHAVIOR_HIDDEN"

    "AbilitySpecial"
    {
        "01"
        {
            "var_type"          "FIELD_INTEGER"
            "bonus_gold"        "250"
        }
        "02"
        {
            "var_type"                              "FIELD_INTEGER"
            "bonus_gold_radius"             "815"
        }
        "03"
        {
            "var_type"                              "FIELD_INTEGER"
            "gold_loss"                     "-500"
        }
    }

    "OnOwnerDied"
    {
        "RunScript"
        {
          "ScriptFile"    "kelen_criminal_scum.lua"
          "Function"      "Criminal"
        }
        "RunScript"
        {
            "ScriptFile"  "scripts/vscripts/kelen_criminal_scum.lua"
            "Function"    "Scum"
        }      
    }
}

The Criminal Scum ability is one way of triggering a spell you can't manually cast, other ways are "OnOwnerSpawned" or other triggers that aren't "OnSpellStart" and "OnToggle". My values are hardcoded but if you were to call them, with a changing value, I would add:ability:SetLevel(1) to the code of all other abilities or a seperate trigger for "OnOwnerSpawned". Like http://pastebin.com/6ZL2La9k

And

http://pastebin.com/6ZL2La9k http://pastebin.com/zxy7ApZx

Comments