#Struggling with AbilityValues

1 messages · Page 1 of 1 (latest)

quiet hearth
#

Thanks to this server, I found out that we need to use AbilityValues instead of AbilitySpecial.

I made the switch but GetSpecialValueFor() is still not properly retrieving the values for me in my custom spell file

vapid torrent
#

Show code

bleak osprey
#

without more information, the possibilities are endless

quiet hearth
#

custom_projectile_spell.ts

export class custom_projectile_spell extends BaseAbility {
    particle?: ParticleID;

    OnSpellStart(): void {
        const caster = this.GetCaster()
        const point = this.GetCursorPosition()
        const speed = this.GetSpecialValueFor('spec_projectile_speed')

    }
}

npc_abilities_custom.txt

    {
        // General
        //-------------------------------------------------------------------------------------------------------------
        "BaseClass"                        "ability_lua"
        "ScriptFile"                    "abilities/generic/custom_projectile_spell.lua"
        "AbilityUnitTargetTeam"            "DOTA_UNIT_TARGET_TEAM_ENEMY"
        "AbilityUnitTargetType"            "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
        "SpellImmunityType"                "SPELL_IMMUNITY_ENEMIES_NO"
        "SpellDispellableType"            "SPELL_DISPELLABLE_YES"
        "AbilityTextureName"            "meepo_poof"
        "MaxLevel"                        "1"
        "AbilityType"                    "DOTA_ABILITY_TYPE_BASIC"
        "AbilityBehavior"                "DOTA_ABILITY_BEHAVIOR_POINT | DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
        "AbilityUnitTargetTeam"            "DOTA_UNIT_TARGET_TEAM_ENEMY"

        // Casting
        //-------------------------------------------------------------------------------------------------------------
        "AbilityCastPoint"                "0.2"
        "AbilityCastAnimation"            "ACT_DOTA_CAST_ABILITY_1"

        // Time
        //-------------------------------------------------------------------------------------------------------------
        "AbilityCooldown"                "5.0"

        // Cost
        //-------------------------------------------------------------------------------------------------------------
        "AbilityManaCost"                "15"

        // Precache
        //-------------------------------------------------------------------------------------------------------------
        "precache"
        {

        }

        // Special
        //-------------------------------------------------------------------------------------------------------------
        "AbilityValues"
        {
            "01"
            {
                "var_type"  "FIELD_INTEGER"
                "spec_projectile_speed"        "700"
            }
        }
    }
#

It's taking in the other fields that I've entered

vapid torrent
#

yeah ability values skip the index listing that ability special had

#

thats why its not working

#
"AbilityValues"
{
  "spec_projectile_speed"        "700"
}
#

thats it

quiet hearth
#

☠️