#Struggling with AbilityValues
1 messages · Page 1 of 1 (latest)
Show code
without more information, the possibilities are endless
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
I can also provide the transpiled .lua file if that's helpful. I was using https://github.com/ModDota/TypeScriptAddonTemplate as a base
yeah ability values skip the index listing that ability special had
thats why its not working
"AbilityValues"
{
"spec_projectile_speed" "700"
}
thats it
☠️