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

Не работает рецепт

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

Оффлайн Веджитто

  • 12
  • Мощь: 0
Не работает рецепт
« : 03-06-2017, 08:49:35 »
Создал блинк2 и тараску2. Взял рецепт с github.com/Pizzal...ster/game/scripts и отредактировал для блинка и тараски. Ид разный поставил. Работает только рецепт блинка. Тараска не собирается.

Оффлайн Илья

  • Супермодератор
  • 2131
  • Мощь: 21
Re: Не работает рецепт
« Ответ #1 : 03-06-2017, 09:16:54 »
Может скинешь сюда свой код? Ток в спойлер оформи.

Оффлайн Веджитто

  • 12
  • Мощь: 0
Re: Не работает рецепт
« Ответ #2 : 03-06-2017, 09:59:38 »
Спойлер
"item_recipe_heart_datadriven"
{
   // General
   //-------------------------------------------------------------------------------------------------------------
   "BaseClass"                  "item_datadriven"
   "ID"                     "2114"  //Valve's version of this item uses the ID "68".
   "Model"                     "models/props_gameplay/recipe.mdl"
   "AbilityTextureName"         "item_recipe"
   
   // Item Info
   //-------------------------------------------------------------------------------------------------------------
   "ItemCost"                  "0"   
   "ItemShopTags"               ""
   
   // Recipe
   //-------------------------------------------------------------------------------------------------------------
   "ItemRecipe"               "1"
   "ItemResult"               "item_heart2_datadriven"
   "ItemRequirements"
   {
      "01"                  "item_heart;item_heart"
   }
}
"item_heart2_datadriven"
{
   // General
   //-------------------------------------------------------------------------------------------------------------
   "BaseClass"                  "item_datadriven"
   "ID"                     "1114"  //Valve's version of this item uses the ID "114".
   "AbilityBehavior"            "DOTA_ABILITY_BEHAVIOR_PASSIVE"
   "Model"                     "models/props_gameplay/red_box.vmdl"
   "Effect"                  "particles/generic_gameplay/dropped_item.vpcf"
   "AbilityTextureName"         "item_heart"
   
   // Stats      
   //-------------------------------------------------------------------------------------------------------------
   "AbilityCooldown"            "4.0"
      
   // Item Info
   //-------------------------------------------------------------------------------------------------------------
   "ItemCost"                  "11000"
   "ItemShopTags"               "str;regen_health;health_pool"
   "ItemQuality"               "epic"
   "ItemAliases"               "hot;heart of tarrasque"
   "ItemDeclarations"            "DECLARE_PURCHASES_TO_TEAMMATES | DECLARE_PURCHASES_IN_SPEECH | DECLARE_PURCHASES_TO_SPECTATORS"

   // Special   
   //-------------------------------------------------------------------------------------------------------------
   "AbilitySpecial"
   {
      "01"
      {
         "var_type"                     "FIELD_INTEGER"
         "bonus_strength"               "80"
      }
      "02"
      {
         "var_type"                     "FIELD_INTEGER"
         "bonus_health"                  "600"
      }
      "03"
      {
         "var_type"                     "FIELD_INTEGER"
         "health_regen_percent_per_second"   "2"
      }
      "04"
      {
         "var_type"                     "FIELD_FLOAT"
         "cooldown_melee"               "3"
      }
      "05"
      {
         "var_type"                     "FIELD_FLOAT"
         "heal_interval"                  ".03"
      }
      "06"
      {
         "var_type"                     "FIELD_INTEGER"
         "bonus_health_regen"            "150"
      }
   
   }
   
   "Modifiers"
   {
      "modifier_item_heart_datadriven"
      {
         "Passive"         "1"
         "IsHidden"         "1"
         "Attributes"       "MODIFIER_ATTRIBUTE_MULTIPLE"
         
         "Properties"
         {
            "MODIFIER_PROPERTY_STATS_STRENGTH_BONUS"      "%bonus_strength"
            "MODIFIER_PROPERTY_HEALTH_BONUS"            "%bonus_health"
            "MODIFIER_PROPERTY_HEALTH_REGEN_CONSTANT"      "%bonus_health_regen"
         }
      }
      "modifier_item_heart_datadriven_regen"
      {
         "Passive"         "1"
         "IsHidden"         "1"
         
         "ThinkInterval"       "%heal_interval"
         "OnIntervalThink"  //Heal the unit if the item is not on cooldown.
         {
            "RunScript"
            {
               "ScriptFile"               "items/item_heart.lua"
               "Function"                  "modifier_item_heart_datadriven_regen_on_interval_think"
               "HealthRegenPercentPerSecond"   "%health_regen_percent_per_second"
               "HealInterval"               "%heal_interval"
            }
         }
         
         "OnTakeDamage"  //Put the item on cooldown if the damage came from Roshan or a hero.
         {
            "RunScript"
            {
               "ScriptFile"      "items/item_heart.lua"
               "Function"         "modifier_item_heart_datadriven_regen_on_take_damage"
               "CooldownMelee"      "%cooldown_melee"
            }
         }
         
         "OnDestroy"
         {
            "RunScript"
            {
               "ScriptFile"      "items/item_heart.lua"
               "Function"         "modifier_item_heart_datadriven_regen_on_destroy"
            }
         }
      }
      "modifier_item_heart_datadriven_regen_visible"  //A modifier that will appear on the unit's modifier bar while they are being healed.
      {
         "Passive"         "0"
         "IsHidden"         "0"
      }
   }
}
"item_recipe_blink2_datadriven"
{
   // General
   //-------------------------------------------------------------------------------------------------------------
   "BaseClass"                  "item_datadriven"
   "ID"                     "2002"  //Valve's version of this item uses the ID "68".
   "Model"                     "models/props_gameplay/recipe.mdl"
   "AbilityTextureName"         "item_recipe"
   
   // Item Info
   //-------------------------------------------------------------------------------------------------------------
   "ItemCost"                  "0"   
   "ItemShopTags"               ""
   
   // Recipe
   //-------------------------------------------------------------------------------------------------------------
   "ItemRecipe"               "1"
   "ItemResult"               "item_blink2_datadriven"
   "ItemRequirements"
   {
      "01"                  "item_blink;item_blink"
   }
}
"item_blink2_datadriven"
{
   // General
   //-------------------------------------------------------------------------------------------------------------
   "BaseClass"                  "item_datadriven"
   "ID"                     "1001"  //Valve's version of this item uses the ID "1".
   "AbilityBehavior"            "DOTA_ABILITY_BEHAVIOR_POINT | DOTA_ABILITY_BEHAVIOR_DIRECTIONAL | DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES | DOTA_ABILITY_BEHAVIOR_IGNORE_BACKSWING"
   "Model"                     "models/props_gameplay/red_box.vmdl"
   "Effect"                  "particles/generic_gameplay/dropped_item.vpcf"
   "AbilityTextureName"         "item_blink"
   "FightRecapLevel"            "1"
   
   // Stats      
   //-------------------------------------------------------------------------------------------------------------
   "AbilityCastRange"            "0"
   "AbilityCastPoint"            "0.0"
   "AbilityCooldown"            "12.0"
   "AbilityManaCost"            "0"
   
   // Item Info
   //-------------------------------------------------------------------------------------------------------------
   "ItemCost"                  "4450"
   "ItemShopTags"               "teleport"
   "ItemQuality"               "component"
   "ItemAliases"               "blink dagger"
   "SideShop"                  "1"
   "ItemDeclarations"            "DECLARE_PURCHASES_TO_TEAMMATES | DECLARE_PURCHASES_IN_SPEECH | DECLARE_PURCHASES_TO_SPECTATORS"

   // Special   
   //-------------------------------------------------------------------------------------------------------------
   "AbilitySpecial"
   {
      "01"
      {
         "var_type"                  "FIELD_INTEGER"
         "max_blink_range"            "2400"
      }
      "02"
      {
         "var_type"                  "FIELD_INTEGER"
         "blink_range_clamp"            "2000"  //When attempting to blink a distance greater than max_blink_range, the caster blinks this distance in the targeted direction.
      }
      "03"
      {
         "var_type"                  "FIELD_INTEGER"
         "blink_damage_cooldown"         "3"
      }
   }
   
   "OnSpellStart"
   {
      "RunScript"
      {
         "ScriptFile"         "items/blink2_lua.lua"
         "Function"            "item_blink_datadriven_on_spell_start"
         "Target"            "POINT"
         "MaxBlinkRange"         "%max_blink_range"
         "BlinkRangeClamp"      "%blink_range_clamp"
      }
   }
   
   "Modifiers"
   {
      //When the unit takes damage, Blink Dagger is put on cooldown.
      "modifier_item_blink_datadriven_damage_cooldown"
      {
         "Passive"         "1"
         "IsHidden"         "1"
         "Attributes"       "MODIFIER_ATTRIBUTE_MULTIPLE"
         
         "OnTakeDamage"
         {
            "RunScript"
            {
               "ScriptFile"         "items/blink2_lua.lua"
               "Function"            "modifier_item_blink_datadriven_damage_cooldown_on_take_damage"
               "BlinkDamageCooldown"   "%blink_damage_cooldown"
               "Damage"            "%attack_damage"
            }
         }
      }
   }
}
[свернуть]
Может скинешь сюда свой код? Ток в спойлер оформи.

Оффлайн Илья

  • Супермодератор
  • 2131
  • Мощь: 21
Re: Не работает рецепт
« Ответ #3 : 03-06-2017, 14:38:02 »
Само твое сердце то работает?

Явных ошибок не вижу, проверь через другие ингредиенты рецепт.

Оффлайн I_GRIN_I

  • Продвинутый
  • 608
  • Мощь: 11
  • Научиться бы скриптить...
Re: Не работает рецепт
« Ответ #4 : 03-06-2017, 17:34:17 »
Веджитто, попробуй исправить item_recipe_heart_datadriven на item_recipe_heart2_datadriven