Unit loses setted material group when affected by skill (es fissure, bristle's spray, tide's smash etc.)
Datadriven class of unit is full copy of npc_dota_greevil except baseClass changed to npc_dota_creature. Also unit have AttachWearables block.
Lua code:
material_groups_demo.png
Full code of datadriven class
Datadriven class of unit is full copy of npc_dota_greevil except baseClass changed to npc_dota_creature. Also unit have AttachWearables block.
Lua code:
Code:
local greevil = CreateUnitByName("npc_dota_greevil_custom", vSpawnLocation, true, nil, nil, nTeam ); greevil:SetMaterialGroup("4");
Full code of datadriven class
Code:
"npc_dota_greevil_custom" { // General // "BaseClass" "npc_dota_creature" // Class of entity of link to. "Model" "models\courier\greevil\greevil.mdl" // Model. "SoundSet" "Greevil" // Name of sound set. "ModelScale" "1" // "AnimationModifier" "miniboss" "MinimapIconSize" "1" // Abilities //---------------------------------------------------------------- "Ability1" "" // Ability 1. "Ability2" "" // Ability 2. "Ability3" "" // Ability 3. "Ability4" "" // Ability 4. // Armor //---------------------------------------------------------------- "ArmorPhysical" "1" // Physical protection. "MagicalResistance" "1" // Magical protection. // Attack //---------------------------------------------------------------- "AttackCapabilities" "DOTA_UNIT_CAP_NO_ATTACK" // "AttackDamageMin" "31" // Damage range min. // "AttackDamageMax" "34" // Damage range max. // "AttackRate" "1.8" // Speed of attack. // "AttackAnimationPoint" "0.5" // Normalized time in animation cycle to attack. // "AttackAcquisitionRange" "600" // Range within a target can be acquired. // "AttackRange" "128" // Range within a target can be attacked. // Bounty //---------------------------------------------------------------- "BountyXP" "0" // Experience earn. "BountyGoldMin" "0" // Gold earned min. "BountyGoldMax" "0" // Gold earned max. // Bounds //---------------------------------------------------------------- "RingRadius" "55" "HealthBarOffset" "170" "BoundsHullName" "DOTA_HULL_SIZE_REGULAR" // Movement //---------------------------------------------------------------- "MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND" // Type of locomotion - ground, air "MovementSpeed" "300" // Speed "MovementTurnRate" "0.4" // Turning rate. // Status //---------------------------------------------------------------- "StatusHealth" "600" // Base health. "StatusHealthRegen" "5" // Health regeneration rate. "StatusMana" "600" // Base mana. "StatusManaRegen" "5" // Mana regeneration rate. // Team //---------------------------------------------------------------- "TeamName" "DOTA_TEAM_NEUTRALS" "CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_HERO" "CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_HERO" "UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT" // Vision //---------------------------------------------------------------- "VisionDaytimeRange" "1800" // Range of vision during day light. "VisionNighttimeRange" "800" // Range of vision at night time. "Creature" { "AttachWearables" { "Wearable1" { "ItemDef" "10072" } "Wearable2" { "ItemDef" "10073" } "Wearable3" { "ItemDef" "10075" } "Wearable4" { "ItemDef" "10078" } "Wearable5" { "ItemDef" "10081" } "Wearable6" { "ItemDef" "10084" } "Wearable7" { "ItemDef" "10087" } "Wearable8" { "ItemDef" "10090" } } } }
Comment