- 28 Июн 2018
- 119
- 2
- Проект
- s
Help pls, не появляется хроносфера, анимация каста есть, звук есть. А вот самой хроносферы нет. Есть 3 доп. файла(chronospehere.lua, modifier_chronosphere_speed_lua.lua и npc_dummy_unit.txt)
KV:
Chronosphere.lua :
modifier_chronosphere_speed_lua.lua :
npc_dummy_unit.txt :
KV:
KV:
"chronosphere_datadriven"
{
// General
//-------------------------------------------------------------------------------------------------------------
"BaseClass" "ability_datadriven"
"MaxLevel" "7"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_AOE | DOTA_ABILITY_BEHAVIOR_POINT"
"AbilityType" "DOTA_ABILITY_TYPE_ULTIMATE"
"SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
"FightRecapLevel" "2"
"AbilityTextureName" "flash\5"
"AOERadius" "%radius"
// Precache
//-------------------------------------------------------------------------------------------------------------
"precache"
{
"soundfile" "soundevents/game_sounds_heroes/game_sounds_faceless_void.vsndevts"
"particle" "particles/units/heroes/hero_faceless_void/faceless_void_chronosphere.vpcf"
"particle" "particles/units/heroes/hero_faceless_void/faceless_void_chrono_speed.vpcf"
}
// Casting
//-------------------------------------------------------------------------------------------------------------
"AbilityCastRange" "10000"
"AbilityCastPoint" "0.0"
// Time
//-------------------------------------------------------------------------------------------------------------
"AbilityCooldown" "130.0 115.0 100.0 95.0 80.0 75.0 65.0"
// Cost
//-------------------------------------------------------------------------------------------------------------
"AbilityManaCost" "0 1 2 3 4 5 6"
// Stats
//-------------------------------------------------------------------------------------------------------------
"AbilityModifierSupportBonus" "50"
// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"radius" "10000"
}
"02"
{
"var_type" "FIELD_FLOAT"
"duration" "4.0 4.5 5.0 7.0 7.5 8.5 9.0"
}
"03"
{
"var_type" "FIELD_FLOAT"
"duration_scepter" "4.0 5.0 6.0 7.0 8.0 9.0 11.0"
}
"04"
{
"var_type" "FIELD_FLOAT"
"cooldown_scepter" "60.0"
}
"05"
{
"var_type" "FIELD_INTEGER"
"vision_radius" "10000"
}
// Extra
"06"
{
"var_type" "FIELD_FLOAT"
"aura_interval" "0.1"
}
// If you want the Chronosphere to ignore Faceless Void then keep it at 1 otherwise set it to 0
"07"
{
"var_type" "FIELD_INTEGER"
"ignore_void" "0"
}
"08"
{
"var_type" "FIELD_INTEGER"
"speed" "15000"
}
}
"OnSpellStart"
{
"FireSound"
{
"EffectName" "Hero_FacelessVoid.Chronosphere"
"Target" "CASTER"
}
"RunScript"
{
"ScriptFile" "scripts/vscripts/heroes/hero_faceless_void/chronosphere.lua"
"Function" "Chronosphere"
"Target" "POINT"
"dummy_aura" "modifier_chronosphere_aura_datadriven"
}
}
"Modifiers"
{
// Cosmetic
"modifier_chronosphere_tooltip_datadriven"
{
"IsDebuff" "1"
"IsPurgable" "0"
}
"modifier_chronosphere_aura_datadriven"
{
"OnCreated"
{
"AttachEffect"
{
"EffectName" "particles/units/heroes/hero_faceless_void/faceless_void_chronosphere.vpcf"
"EffectAttachType" "attach_origin"
"Target" "TARGET"
"ControlPoints"
{
"01" "%radius %radius 0"
}
}
}
"ThinkInterval" "%aura_interval"
"OnIntervalThink"
{
"ActOnTargets"
{
"Target"
{
"Center" "TARGET"
"Types" "DOTA_UNIT_TARGET_ALL"
"Teams" "DOTA_UNIT_TARGET_TEAM_FRIENDLY | DOTA_UNIT_TARGET_TEAM_ENEMY"
"Flags" "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES"
"Radius" "%radius"
}
"Action"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/heroes/hero_faceless_void/chronosphere.lua"
"Function" "ChronosphereAura"
"Target" "TARGET"
"aura_modifier" "modifier_chronosphere_datadriven"
}
}
}
}
"States"
{
"MODIFIER_STATE_INVULNERABLE" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NO_HEALTH_BAR" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NOT_ON_MINIMAP" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_UNSELECTABLE" "MODIFIER_STATE_VALUE_ENABLED"
}
}
"modifier_chronosphere_datadriven"
{
"IsHidden" "1"
"OnCreated"
{
"ApplyModifier"
{
"ModifierName" "modifier_chronosphere_tooltip_datadriven"
"Target" "TARGET"
}
}
"OnDestroy"
{
"RemoveModifier"
{
"ModifierName" "modifier_chronosphere_tooltip_datadriven"
"Target" "TARGET"
}
}
"States"
{
"MODIFIER_STATE_STUNNED" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_FROZEN" "MODIFIER_STATE_VALUE_ENABLED"
}
}
}
}
Chronosphere.lua :
Lua:
LinkLuaModifier("modifier_chronosphere_speed_lua", "heroes/hero_faceless_void/modifiers/modifier_chronosphere_speed_lua.lua", LUA_MODIFIER_MOTION_NONE)
function Chronosphere( keys )
-- Variables
local caster = keys.caster
local ability = keys.ability
local target_point = keys.target_points[1]
-- Special Variables
local duration = ability:GetLevelSpecialValueFor("duration", (ability:GetLevel() - 1))
local vision_radius = ability:GetLevelSpecialValueFor("vision_radius", (ability:GetLevel() - 1))
-- Dummy
local dummy_modifier = keys.dummy_aura
local dummy = CreateUnitByName("npc_dummy_unit", target_point, false, caster, caster, caster:GetTeam())
dummy:AddNewModifier(caster, nil, "modifier_phased", {})
ability:ApplyDataDrivenModifier(caster, dummy, dummy_modifier, {duration = duration})
-- Vision
AddFOWViewer(caster:GetTeamNumber(), target_point, vision_radius, duration, false)
-- Timer to remove the dummy
Timers:CreateTimer(duration, function() dummy:RemoveSelf() end)
end
function ChronosphereAura( keys )
local caster = keys.caster
local target = keys.target
local ability = keys.ability
local ability_level = ability:GetLevel() - 1
-- Ability variables
local aura_modifier = keys.aura_modifier
local ignore_void = ability:GetLevelSpecialValueFor("ignore_void", ability_level)
local duration = ability:GetLevelSpecialValueFor("aura_interval", ability_level)
-- Variable for deciding if Chronosphere should affect Faceless Void
if ignore_void == 0 then ignore_void = false
else ignore_void = true end
-- Check if it is a caster controlled unit or not
-- Caster controlled units get the phasing and movement speed modifier
if (caster:GetPlayerOwner() == target:GetPlayerOwner()) or (target:GetName() == "npc_dota_hero_faceless_void" and ignore_void) then
target:AddNewModifier(caster, ability, "modifier_chronosphere_speed_lua", {duration = duration})
else
-- Everyone else gets immobilized and stunned
target:InterruptMotionControllers(false)
ability:ApplyDataDrivenModifier(caster, target, aura_modifier, {duration = duration})
end
end
modifier_chronosphere_speed_lua.lua :
Lua:
modifier_chronosphere_speed_lua = class({})
function modifier_chronosphere_speed_lua:DeclareFunctions()
local funcs =
{
MODIFIER_PROPERTY_MOVESPEED_MAX,
MODIFIER_PROPERTY_MOVESPEED_LIMIT,
MODIFIER_PROPERTY_MOVESPEED_ABSOLUTE
}
return funcs
end
function modifier_chronosphere_speed_lua:GetModifierMoveSpeed_Limit()
return self:GetAbility():GetSpecialValueFor("speed")
end
function modifier_chronosphere_speed_lua:GetModifierMoveSpeed_Max()
return self:GetAbility():GetSpecialValueFor("speed")
end
function modifier_chronosphere_speed_lua:GetModifierMoveSpeed_Absolute()
return self:GetAbility():GetSpecialValueFor("speed")
end
function modifier_chronosphere_speed_lua:CheckState()
local state = {
[MODIFIER_STATE_NO_UNIT_COLLISION] = true
}
return state
end
function modifier_chronosphere_speed_lua:IsHidden()
return true
end
function modifier_chronosphere_speed_lua:OnCreated()
if IsServer() then
self.nFXIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_faceless_void/faceless_void_chrono_speed.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetParent())
self:AddParticle(self.nFXIndex, false, false, -1, false, false)
end
end
KV:
// Made by BMD
"npc_dummy_unit"
{
// General
//
"BaseClass" "npc_dota_base_additive" // Class of entity of link to.
"Model" "models/development/invisiblebox.vmdl" // Model.
"SoundSet" "Creep_Good_Range" // Name of sound set.
"Level" "0"
"UnitLabel" "healing_ward"
// Abilities
//----------------------------------------------------------------
"Ability1" "" // Ability 1.
"Ability2" "" // Ability 2.
"Ability3" "" // Ability 3.
"Ability4" "" // Ability 4.
"Ability5" "" // Ability 5.
"Ability6" "" // Ability 6 - Extra.
"Ability7" "" // Ability 7 - Extra.
"Ability8" "" // Ability 8 - Extra.
// Armor
//----------------------------------------------------------------
"ArmorPhysical" "0" // Physical protection.
"MagicalResistance" "0" // Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_NO_ATTACK" // Type of attack - melee, ranged, etc.
"AttackDamageMin" "0" // Damage range min.
"AttackDamageMax" "0" // Damage range max.
"AttackDamageType" "DAMAGE_TYPE_ArmorPhysical"
"AttackRate" "1" // Speed of attack.
"AttackAnimationPoint" "0.5" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "500" // Range within a target can be attacked.
"ProjectileModel" "" // Particle system model for projectile.
"ProjectileSpeed" "900" // Speed of projectile.
// Attributes
//----------------------------------------------------------------
"AttributePrimary" "DOTA_ATTRIBUTE_STRENGTH"
"AttributeBaseStrength" "0" // Base strength
"AttributeStrengthGain" "0" // Strength bonus per level.
"AttributeBaseIntelligence" "0" // Base intelligence
"AttributeIntelligenceGain" "0" // Intelligence bonus per level.
"AttributeBaseAgility" "0" // Base agility
"AttributeAgilityGain" "0" // Agility bonus per level.
// Bounty
//----------------------------------------------------------------
"BountyXP" "0" // Experience earn.
"BountyGoldMin" "0" // Gold earned min.
"BountyGoldMax" "0" // Gold earned max.
// Bounds
//----------------------------------------------------------------
"BoundsHullName" "DOTA_HULL_SIZE_SMALL" // Hull type used for navigation/locomotion.
// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND" // Type of locomotion - ground, air
"MovementSpeed" "450" // Speed
"MovementTurnRate" "10" // Turning rate.
"FollowRange" "250" // Distance to keep when following
// Status
//----------------------------------------------------------------
"StatusHealth" "1" // Base health.
"StatusHealthRegen" "0" // Health regeneration rate.
"StatusMana" "0" // Base mana.
"StatusManaRegen" "0" // Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_GOODGUYS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_SOFT"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_WARD"
// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "0" // Range of vision during day light.
"VisionNighttimeRange" "0" // Range of vision at night time.
// Bots
//----------------------------------------------------------------
"AttackDesire" "1.5" // How much bots want to attack them vs other non-hero things
}