Моб почему то не работает по скрипту , однако когда вызываю через -createhero wind_3 enemy то все абилки юзаются.
На скриншоте видно , что верхний просто бьёт ,а нижний кастует скилы.
При том скрипт сам по себе работает проходка есть , в чем же дело ?!
На скриншоте видно , что верхний просто бьёт ,а нижний кастует скилы.
При том скрипт сам по себе работает проходка есть , в чем же дело ?!
Код:
"npc_dota_boss_wind_3"
{
// General
//
"vscripts" "ai/ai_windboss3.lua"
"BaseClass" "npc_dota_creature" // Class of entity of link to.
"Model" "models/heroes/storm_spirit/storm_spirit.vmdl"
"SoundSet" "Hero_StormSpirit" // Name of sound set.
"ModelScale" "1.4" // old 1.0
"Level" "3"
"UseNeutralCreepBehavior" "1"
"IsNeutralUnitType" "1"
"AutoAttacksByDefault" "1"
"IsAncient" "1"
"HasInventory" "1"
// Abilities
//----------------------------------------------------------------
"Ability1" "creature_split_shot"
"Ability2" "storm_spirit_static_remnant"
"Ability3" "storm_spirit_electric_vortex"
"Ability4" "storm_spirit_overload"
"Ability5" "" // Ability 5.
"Ability6" "" // Ability 6 - Extra.
"Ability7" "" // Ability 7 - Extra.
"Ability8" "" // Ability 8 - Extra.
// Armor
//----------------------------------------------------------------
"ArmorPhysical" "100" // Physical protection.
"MagicalResistance" "35" // Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_RANGED_ATTACK"
"AttackDamageMin" "1550" // Damage range min.
"AttackDamageMax" "1750" // Damage range max.
"AttackDamageType" "DAMAGE_TYPE_ArmorPhysical"
"AttackRate" "0.33" // Speed of attack.
"AttackAnimationPoint" "0.2" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "600" // Range within a target can be attacked.
"ProjectileModel" "particles/units/heroes/hero_stormspirit/stormspirit_base_attack.vpcf"
"ProjectileSpeed" "1500" // 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" "25000" // Experience earn.
"BountyGoldMin" "4000" // Gold earned min.
"BountyGoldMax" "5000" // Gold earned max.
// Bounds
//----------------------------------------------------------------
"BoundsHullName" "DOTA_HULL_SIZE_REGULAR" // Hull type used for navigation/locomotion.
"RingRadius" "45"
"HealthBarOffset" "550"
// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND" // Type of locomotion - ground, air
"MovementSpeed" "325" // Speed
"MovementTurnRate" "0.3" // Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth" "150000" // Base health.
"StatusHealthRegen" "250" // Health regeneration rate.
"StatusMana" "50000" // Base mana.
"StatusManaRegen" "250" // Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_BADGUYS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_BASIC"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"
// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "750" // Range of vision during day light.
"VisionNighttimeRange" "750" // Range of vision at night time.
//Inventory
"Creature"
{
"CanRespawn" "0"
"DisableResistance" "90"
"ItemDrops"
{
"StatTomes"
{
"Item"
{
"1" "item_bonus_strength10"
"2" "item_bonus_agility10"
"3" "item_bonus_intelligence10"
"4" "item_bonus_stats10"
}
"Chance" "100"
}
"StatTomes"
{
"Item"
{
"1" "item_zeus_helm"
}
"Chance" "100"
}
}
"EquippedItems"
{
"1" {"Item" "item_zeus_helm"}
"2" {"Item" "item_ultimate_scepter"}
"3" {"Item" "item_sphere"}
}
"AttachWearables"
{
"Wearable1" { "ItemDef" "8247" } //hair
"Wearable2" { "ItemDef" "8249" } //head
"Wearable3" { "ItemDef" "8251" } //shoulders
}
}
}
Код:
function Spawn( entityKeyValues )
print("vse ok1 !")
if not IsServer() then
return
end
if thisEntity == nil then
return
end
print("vse ok2 !")
-- thisEntity:AddNewModifier( thisEntity, nil, "modifier_fow_vision", nil )
RemnantAbility = thisEntity:FindAbilityByName( "storm_spirit_static_remnant" )
VortexAbility = thisEntity:FindAbilityByName( "storm_spirit_electric_vortex" )
thisEntity:SetContextThink( "WindsBoss3Think", WindsBoss3Think, 1 )
end
function WindsBoss3Think()
if ( not thisEntity:IsAlive() ) then
return -1
end
print("vse ok3 !")
if GameRules:IsGamePaused() == true then
return 1
end
-- Increase acquisition range after the initial aggro
local enemies = FindUnitsInRadius(
thisEntity:GetTeamNumber(),
thisEntity:GetOrigin(),
thisEntity,
750,
DOTA_UNIT_TARGET_TEAM_ENEMY,
DOTA_UNIT_TARGET_HERO,
DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_NO_INVIS,
FIND_CLOSEST,
false )
print("enemies ="..#enemies)
if #enemies > 0 then
print("vse ok4 !")
if RemnantAbility ~= nil and RemnantAbility:IsFullyCastable() then
print("vse ok5 !")
return Remnant()
end
if thisEntity:GetHealth() < ( thisEntity:GetMaxHealth() * 0.6 ) then
if VortexAbility ~= nil and VortexAbility:IsFullyCastable() then
print("vse ok6 !")
return Vortex()
end
end
end
return 1
end
function Remnant()
ExecuteOrderFromTable({
UnitIndex = thisEntity:entindex(),
OrderType = DOTA_UNIT_ORDER_CAST_NO_TARGET,
AbilityIndex = RemnantAbility:entindex(),
Queue = false,
})
return 0.5
end
function Vortex()
ExecuteOrderFromTable({
UnitIndex = thisEntity:entindex(),
OrderType = DOTA_UNIT_ORDER_CAST_NO_TARGET,
AbilityIndex = VortexAbility:entindex(),
Queue = false,
})
return 0.5
end
Последнее редактирование: