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

Как заставить крипа убегать от героя (NPC)

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

Оффлайн den4iccc

  • 276
  • Мощь: 4
Как заставить крипа убегать от героя если он нанесёт урон этому npc и ещё один вопрос можно ли размера модели (item) предмета изменить (Scale)    
"ModelScale"  "0.5" в предметах не работает
Код
"reindeer"
{
"BaseClass" "npc_dota_creature" // Class of entity of link to.
"Model" "models/heroes/enchantress/enchantress.vmdl"
"ModelScale" "1"
"Level" "1"

"ConsideredHero"        "0"

"UseNeutralCreepBehavior" "0"

"HasInventory" "1"
// Abilities
//----------------------------------------------------------------
"AbilityLayout" "5"
"Ability1" "" // Ability 1. healmp_aura
"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"
"AttackDamageMin" "0" // Damage range min.
"AttackDamageMax" "0" // Damage range max.
"AttackRate" "2" // Speed of attack.
"AttackAnimationPoint" "0.38" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "500" // Range within a target can be acquired.
"AttackRange" "100" // Range within a target can be attacked.
"ProjectileModel" "" // Particle system model for projectile.
"ProjectileSpeed" "0" // Speed of projectile.

// Bounty
//----------------------------------------------------------------
"BountyXP" "30" // Experience earn.
"BountyGoldMin" "8" // Gold earned min.
"BountyGoldMax" "10" // Gold earned max.

// Bounds
//----------------------------------------------------------------
"RingRadius" "70"
"HealthBarOffset" "260"
"BoundsHullName" "DOTA_HULL_SIZE_HUGE"

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND" // Type of locomotion - ground, air
"MovementSpeed" "290" // Speed
"MovementTurnRate" "0.5" // Turning rate.

// Status
//----------------------------------------------------------------
"StatusHealth" "45" // Base health.
"StatusHealthRegen" "0.5" // Health regeneration rate.
"StatusMana" "300" // Base mana.
"StatusManaRegen" "0.75" // Mana regeneration rate.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_BAD" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

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

}
« Последнее редактирование: 13-01-2017, 16:13:42 от den4iccc »

Оффлайн Илья

  • Супермодератор
  • 1904
  • Мощь: 16
За страх, убегание, отвечает параметр Avoidance, насколько помню. Вот тебе пример одного моего юнита, который убегает:

Код
		// Creature Data
//----------------------------------------------------------------
"Creature"
{
"DefaultState"       "Invade"
"States"
{
    "Invade"
    {
        "Name"          "Invade"
        "Aggression"    "0.0"
        "Avoidance"     "100.0"
        "Support"       "0.0"
        "RoamDistance"  "1000.0"
    }
}
}

Оффлайн den4iccc

  • 276
  • Мощь: 4
Код
"reindeer"
{
"BaseClass" "npc_dota_creature" // Class of entity of link to.
"Model" "models/heroes/enchantress/enchantress.vmdl"
"ModelScale" "1"
"Level" "1"

"ConsideredHero"        "0"

"UseNeutralCreepBehavior" "0"

"HasInventory" "1"
// Abilities
//----------------------------------------------------------------
"AbilityLayout" "5"
"Ability1" "ability_run" // Ability 1. healmp_aura
"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"
"AttackDamageMin" "0" // Damage range min.
"AttackDamageMax" "0" // Damage range max.
"AttackRate" "2" // Speed of attack.
"AttackAnimationPoint" "0.38" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "500" // Range within a target can be acquired.
"AttackRange" "100" // Range within a target can be attacked.
"ProjectileModel" "" // Particle system model for projectile.
"ProjectileSpeed" "0" // Speed of projectile.
    "Avoidance"     "100.0"
// Bounty
//----------------------------------------------------------------
"BountyXP" "0" // Experience earn.
"BountyGoldMin" "0" // Gold earned min.
"BountyGoldMax" "0" // Gold earned max.

// Bounds
//----------------------------------------------------------------
"RingRadius" "70"
"HealthBarOffset" "260"
"BoundsHullName" "DOTA_HULL_SIZE_HUGE"

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND" // Type of locomotion - ground, air
"MovementSpeed" "290" // Speed
"MovementTurnRate" "0.5" // Turning rate.

// Status
//----------------------------------------------------------------
"StatusHealth" "4500" // Base health. 45
"StatusHealthRegen" "0.5" // Health regeneration rate.
"StatusMana" "300" // Base mana.
"StatusManaRegen" "0.75" // Mana regeneration rate.

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

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

// Creature Data
//----------------------------------------------------------------
"Creature"
{
"DefaultState"       "Invade"
"States"
{
    "Invade"
    {
        "Name"          "Invade"
        "Aggression"    "0.0"
        "Avoidance"     "100.0"
        "Support"       "0.0"
        "RoamDistance"  "1000.0"
    }
}
}

}
Что я не так делаю ? он даже с места не сдвигается  :) :) :)

Оффлайн Илья

  • Супермодератор
  • 1904
  • Мощь: 16
Ой, без понятия, можешь попробовать моего просто перенять и глянуть.
Абилки ток удали, они все самодельные и отношения к побегам не имеют.

Спойлер
Код
"npc_fish"	
{
// General
//----------------------------------------------------------------
"Model" "models/items/hex/fish_hex/fish_hex.vmdl"
"BaseClass" "npc_dota_creature"
"SoundSet" "n_creep_Melee"
"GameSoundsFile" "soundevents/game_sounds_creeps.vsndevts"
"Level" "1"
"ModelScale" "1.1"
"HasInventory" "1"
"UseNeutralCreepBehavior" "1"
"CanBeDominated"            "1"

// Abilities
//----------------------------------------------------------------
"Ability1" "ability_no_health_bar"
"Ability2" "ability_set_spawn_settings"
"Ability3" "neutrals_respawn"
"Ability4" "ability_save_killer"
"Ability5" "ability_apply_modifier_quest_fish"

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "0" // Physical protection.
"MagicalResistance"         "0"
// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageType" "DAMAGE_TYPE_ArmorPhysical"
"AttackDamageMin" "1" // Damage range min.
"AttackDamageMax" "1" // Damage range max.
"AttackRate" "1.6" // Speed of attack.
"AttackAnimationPoint" "0.4" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "90" // Range within a target can be attacked.
     

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

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

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


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

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


// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_BADGUYS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

// Creature Data
//----------------------------------------------------------------
"Creature"
{
//Level Up
"HPGain"                    "0"
"DamageGain"                "0"
"ArmorGain"                 "0"
"ManaGain"                  "0"
"MagicResistGain"           "0"
"MoveSpeedGain"             "0"
"BountyGain"                "0"
"XPGain"                    "0"

"DefaultState"       "Invade"
"States"
{
    "Invade"
    {
        "Name"          "Invade"
        "Aggression"    "0.0"
        "Avoidance"     "100.0"
        "Support"       "0.0"
        "RoamDistance"  "1000.0"
    }
}

}
}
[свернуть]

Оффлайн den4iccc

  • 276
  • Мощь: 4
Всё разобрался там было застревание
Код
"DisableClumpingBehavior"   "1"

+   
Код
"UnitLabel"             "creep"
Спасибо, +rep
« Последнее редактирование: 13-01-2017, 19:02:30 от den4iccc »