CustomGames.ru - Dota 2 пользовательские игры

Юнит с моделью героя

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн fiCeVitka

  • Продвинутый
  • 48
  • Мощь: 0
Юнит с моделью героя
« : 24-07-2015, 22:22:16 »
Хочу создать юнита с моделью героя, но происходит ошибка
Код
"npc_razor"	
{
// General
//----------------------------------------------------------------
"Model" "models/heroes/razor/razor.vmdl" // Model.
"BaseClass" "npc_dota_creature"
"SoundSet" "Hero_Razor"
"GameSoundsFile" "soundevents/game_sounds_heroes/game_sounds_razor.vsndevts"
"Level" "15"
"ModelScale" ".9"
"IsNeutralUnitType"         "1"
"UnitLabel"                 "spawn_razor"
"UseNeutralCreepBehavior" "1"
                "precache"
                {
                "model"                 "models/heroes/razor/razor.vmdl"
                }

// Abilities
//----------------------------------------------------------------
"Ability1" "" // Ability 1
"Ability2" "" // Ability 2
"Ability3" "" // Ability 3
"Ability4" "" // Ability 4

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "2" // Physical protection.

// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_RANGED_ATTACK"
"AttackDamageMin" "8" // Damage range min.
"AttackDamageMax" "12" // Damage range max.
"AttackRate" "2" // Speed of attack.
"AttackAnimationPoint"         "0.4" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange"         "600" // Range within a target can be acquired.
"AttackRange" "425" // Range within a target can be attacked.
"ProjectileModel" "particles/units/heroes/hero_razor/razor_base_attack.vpcf" // Particle system model for projectile.
"ProjectileSpeed" "1000" // Speed of projectile.      

// Bounds
//----------------------------------------------------------------
"RingRadius" "40"
"HealthBarOffset" "170"

// Bounty
//----------------------------------------------------------------
"BountyXP" "0" // Experience earn.
"BountyGoldMin" "6" // Gold earned min.
"BountyGoldMax" "7" // Gold earned max.

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "270" // Speed.

// Status
//----------------------------------------------------------------
"StatusHealth" "70" // Base health.
"StatusHealthRegen" "0.5" // Health regeneration rate.
"StatusMana" "0" // Base mana.
"StatusManaRegen" "0" // Mana regeneration rate.

// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "600" // Range of vision during day light.
"VisionNighttimeRange" "600" // Range of vision at night time.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_NEUTRALS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_WEAK"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

// Creature Data
//----------------------------------------------------------------
"Creature"
{
//Level Up
"HPGain" "50"
"DamageGain" "2"
"ArmorGain" "0.25"
"MagicResistGain" "0.1"
"MoveSpeedGain" "1"
"BountyGain" "3"
"XPGain" "15"
"DefaultState" "Invade"
"States"
{
"Invade"
{
"Name" "Invade"
"Aggression" "90.0" //cast offensive spells whenever
"Avoidance" "0.0" //dont flee
"Support" "0.0" //start buffing
"RoamDistance"      "600.0"
}
}
                        "AttachWearables"
{
"Wearable1"
{
"ItemDef" "340"
}
"Wearable2"
{
"ItemDef" "341"
}
"Wearable3"
{
"ItemDef" "342"
}
"Wearable4"
{
"ItemDef" "343"
}
"Wearable5"
{
"ItemDef" "344"
}
}
}
}
Сама ошибка
Код
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor.vmdl' (3D785FEC3274CB0E) requested is not loaded and may have been deleted.
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor_weapon.vmdl' (FF82592C66E2B678) requested is not loaded and may have been deleted.
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor_head.vmdl' (B6F55E6D7DE07F6A) requested is not loaded and may have been deleted.
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor_armor.vmdl' (18340D5014F90B99) requested is not loaded and may have been deleted.
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor_bracers.vmdl' (3744ED79D70B81F0) requested is not loaded and may have been deleted.
[ W ResourceSystem       ]: ERROR: RESOURCE_TYPE_MODEL resource 'models/heroes/razor/razor_robe.vmdl' (D99C24FEF4B032FD) requested is not loaded and may have been deleted.

Оффлайн Se7eN

  • Продвинутый
  • 298
  • Мощь: 11
  • King
Re: Юнит с моделью героя
« Ответ #1 : 24-07-2015, 23:16:52 »
Не знаю что у тебя там не так, да и не хочу разбираться.
Вот мой юнит, если поможет. Юнит обычный, но с моделькой героя

Код
		"kek1" 
{
"BaseClass" "npc_dota_creature"
"Model" "models/heroes/sand_king/sand_king.mdl"
"Portrait"     "vgui/hud/heroportraits/portrait_sandking"
"SoundSet" ""
"ModelScale" "0.85"
"Level" "1"


"Ability1" ""
"Ability2" ""
"Ability3" ""
"Ability4" ""
"Ability5" ""
"Ability6" ""
"Ability7" ""
"Ability8" ""

"ArmorPhysical" "2"
"MagicalResistance" "0"

"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin" "7"
"AttackDamageMax" "12"                          //ataka
"AttackRate" "1.35"                             //aspd
"AttackAnimationPoint" "0.3"
"AttackAcquisitionRange" "600"
"AttackRange" "128"
"ProjectileModel" ""
"ProjectileSpeed" ""

"BountyXP" "10"                                 //EXP
"BountyGoldMin" "5"
"BountyGoldMax" "7"

"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "270"
"MovementTurnRate" "0.8"

"StatusHealth" "100"                             //HP
"StatusHealthRegen" "1.5"
"StatusMana" "30"
"StatusManaRegen" "0"

"TeamName" "DOTA_TEAM_NEUTRALS"
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_BASIC"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_STRONG"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

"VisionDaytimeRange" "1800"
"VisionNighttimeRange" "1800"

"HasInventory" "0"

"precache"
{
"model" "models/heroes/sand_king/sand_king.mdl"
"model" "models/heroes/sand_king/sand_king_head.mdl"
"model" "models/heroes/sand_king/sand_king_shoulder.mdl"
"model" "models/heroes/sand_king/sand_king_arms.mdl"
"model" "models/heroes/sand_king/sand_king_tail.mdl"
"model" "models/heroes/sand_king/sand_king_legs.mdl"
"particle" "particles/units/heroes/hero_sandking/sandking_portrait.vpcf"
}

"Creature"
{
"AttachWearables"
{
"Wearable1" { "ItemDef" "180" } //head
"Wearable2" { "ItemDef" "198" } //shoulders
"Wearable3" { "ItemDef" "199" } //arms
"Wearable4" { "ItemDef" "200" } //legs
"Wearable5" { "ItemDef" "201" } //back
}
}
}

Оффлайн fiCeVitka

  • Продвинутый
  • 48
  • Мощь: 0
Re: Юнит с моделью героя
« Ответ #2 : 25-07-2015, 00:00:59 »
Se7eN, спасибо, сработало, еще мог мой код не работать из-за того, что не прекэшировал