Iam trying do teleport ability like Underlord Ulti or twin gate portal. When i just use ability from ability Panel all works normally, but when i use ability via CastAbility work only OnSpellStart, and OnChannelThink OnChannelFinish dont work.
"engineer_teleport_use"
{
"BaseClass" "ability_lua"
"ScriptFile" "abilities/heroes/engineer/engineer_teleport_use"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_CHANNELLED | DOTA_ABILITY_BEHAVIOR_DONT_RESUME_ATTACK | DOTA_ABILITY_BEHAVIOR_DONT_CANCEL_CHANNEL | DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES | DOTA_ABILITY_BEHAVIOR_NOT_LEARNABLE"
"IsCastableWhileHidden" "1"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_ENEMY"
"AbilityUnitTargetFlags" "DOTA_UNIT_TARGET_FLAG_INVULNERABLE"
"AbilityCastAnimation" "ACT_DOTA_GENERIC_CHANNEL_1"
"MaxLevel" "1"
"AbilityChannelTime" "3"
}```
```lua
engineer_teleport_use = class({})
function engineer_teleport_use:OnSpellStart()
self.channel_time_elapsed = 0
print("Test1")
self:SetChanneling(true)
end
function engineer_teleport_use:OnChannelThink(interval)
self.channel_time_elapsed = self.channel_time_elapsed + interval
print(self.channel_time_elapsed)
end
function engineer_teleport_use:OnChannelFinish(bInterrupted)
print("Test3")
end