fobas213 сказал(а):↑благодарю
а по второму вопросу, нужно искать скрипт с восстания короля, и от туда копатьНажмите, чтобы раскрыть...
- 1xблок npc_dota_scripted_spawner задай имя в настройке через alt+enter (path_customspawn) этот (npc_dota_scripted_spawner) - будет точкой спавна
- 2xблок path_corner назави их (path_wp1 и path_wp2). к нему идут крипы path_wp1 а следующий Next Stop Target будет path_wp2
- 1xHero Spawn Location общий 10 человек
Спойлер:в фаил npc_units_custom.txt это наш костум крип ( на пример зумби с холд аута)
// Dota Units File
"DOTAUnits"
{
"Version"
"1"
"npc_dota_creature_basic_zombie"
{
// General
//
"BaseClass"
"npc_dota_creature"
// Class of entity of link to.
"Model"
"models/heroes/undying/undying_minion.vmdl"
// Model.
"SoundSet"
"Undying_Zombie"
// Name of sound set.
"GameSoundsFile"
"soundevents/game_sounds_heroes/game_sounds_undying.vsndevts"
"ModelScale"
".8"
"Level"
"1"
// Abilities
//----------------------------------------------------------------
"Ability1"
""
// Ability 1.
"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"
"3"
// Physical protection.
"MagicalResistance"
"33"
// Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities"
"DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin"
"18"
// Damage range min.
"AttackDamageMax"
"22"
// Damage range max.
"AttackRate"
"1.6"
// Speed of attack.
"AttackAnimationPoint"
"0.3"
// Normalized time in animation cycle to attack.
"AttackAcquisitionRange"
"800"
// Range within a target can be acquired.
"AttackRange"
"128"
// Range within a target can be attacked.
"ProjectileModel"
""
// Particle system model for projectile.
"ProjectileSpeed"
""
// Speed of projectile.
// Bounty
//----------------------------------------------------------------
"BountyXP"
"35"
// Experience earn.
"BountyGoldMin"
"0"
// Gold earned min.
"BountyGoldMax"
"0"
// Gold earned max.
// Bounds
//----------------------------------------------------------------
"RingRadius"
"70"
"HealthBarOffset"
"160"
"BoundsHullName"
"DOTA_HULL_SIZE_SMALL"
// Movement
//----------------------------------------------------------------
"MovementCapabilities"
"DOTA_UNIT_CAP_MOVE_GROUND"
// Type of locomotion - ground, air
"MovementSpeed"
"120"
// Speed
"MovementTurnRate"
"0.5"
// Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth"
"120"
// Base health.
"StatusHealthRegen"
"0.25"
// Health regeneration rate.
"StatusMana"
"0"
// Base mana.
"StatusManaRegen"
"0"
// Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName"
"DOTA_TEAM_BADGUYS"
// Team name.
"CombatClassAttack"
"DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend"
"DOTA_COMBAT_CLASS_DEFEND_SOFT"
"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"
{
"CanRespawn"
"0"
//Basic AI State
//-----------------------------------------------------------------
"DefaultState"
"Invade"
"States"
{
"Invade"
{
"Name"
"Invade"
"Aggression"
"100.0"
"Avoidance"
"0.0"
"Support"
"0.0"
}
}
//Level Up Parameters
//-----------------------------------------------------------------
"HPGain"
"40"
"DamageGain"
"10"
"ArmorGain"
"1"
"MagicResistGain"
"1"
"MoveSpeedGain"
"1"
"BountyGain"
"5"
"XPGain"
"20"
//Ability Usage Parameters
//-----------------------------------------------------------------
}
}
}
теперь в фаил addon_game_mode.lua зададим спав и маршрут
NUMBERTOSPAWN = 8 --How many to spawn
SPAWNLOCATION = "path_customspawn"
WAYPOINTNAME = "path_wp1"
if customSpawn == nil then
customSpawn = class({})
end
function Precache( context )
--Cache the zombie model
PrecacheUnitByNameAsync( "npc_dota_creature_basic_zombie", context )
PrecacheModel( "npc_dota_creature_basic_zombie", context )
end
function customSpawn:spawnunits()
local spawnLocation = Entities:FindByName( nil, SPAWNLOCATION )
local waypointlocation = Entities:FindByName ( nil, WAYPOINTNAME)
local i = 1
while NUMBERTOSPAWN>=i do
--hscript CreateUnitByName( string name, vector origin, bool findOpenSpot, hscript, hscript, int team)
local creature = CreateUnitByName( "npc_dota_creature_basic_zombie" , spawnLocation:GetAbsOrigin() + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS )
print ("create unit has run")
--Sets the waypath to follow. path_wp1 in this example
creature:SetInitialGoalEntity( waypointlocation )
i = i + 1
end
end
function Activate()
GameRules.customSpawn = customSpawn()
GameRules.customSpawn:InitGameMode()
end
function customSpawn:InitGameMode()
self.spawnunits()
end
смысл в том что юниты будут появляться в
path_customspawn и стемиться к path_wp1 в дальнейшем к path_wp2
![]()
TheAnyKey сказал(а):↑
- 1xблок npc_dota_scripted_spawner задай имя в настройке через alt+enter (path_customspawn) этот (npc_dota_scripted_spawner) - будет точкой спавна
- 2xблок path_corner назави их (path_wp1 и path_wp2). к нему идут крипы path_wp1 а следующий Next Stop Target будет path_wp2
- 1xHero Spawn Location общий 10 человек
Спойлер:в фаил npc_units_custom.txt это наш костум крип ( на пример зумби с холд аута)
// Dota Units File
"DOTAUnits"
{
"Version"
"1"
"npc_dota_creature_basic_zombie"
{
// General
//
"BaseClass"
"npc_dota_creature"
// Class of entity of link to.
"Model"
"models/heroes/undying/undying_minion.vmdl"
// Model.
"SoundSet"
"Undying_Zombie"
// Name of sound set.
"GameSoundsFile"
"soundevents/game_sounds_heroes/game_sounds_undying.vsndevts"
"ModelScale"
".8"
"Level"
"1"
// Abilities
//----------------------------------------------------------------
"Ability1"
""
// Ability 1.
"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"
"3"
// Physical protection.
"MagicalResistance"
"33"
// Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities"
"DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin"
"18"
// Damage range min.
"AttackDamageMax"
"22"
// Damage range max.
"AttackRate"
"1.6"
// Speed of attack.
"AttackAnimationPoint"
"0.3"
// Normalized time in animation cycle to attack.
"AttackAcquisitionRange"
"800"
// Range within a target can be acquired.
"AttackRange"
"128"
// Range within a target can be attacked.
"ProjectileModel"
""
// Particle system model for projectile.
"ProjectileSpeed"
""
// Speed of projectile.
// Bounty
//----------------------------------------------------------------
"BountyXP"
"35"
// Experience earn.
"BountyGoldMin"
"0"
// Gold earned min.
"BountyGoldMax"
"0"
// Gold earned max.
// Bounds
//----------------------------------------------------------------
"RingRadius"
"70"
"HealthBarOffset"
"160"
"BoundsHullName"
"DOTA_HULL_SIZE_SMALL"
// Movement
//----------------------------------------------------------------
"MovementCapabilities"
"DOTA_UNIT_CAP_MOVE_GROUND"
// Type of locomotion - ground, air
"MovementSpeed"
"120"
// Speed
"MovementTurnRate"
"0.5"
// Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth"
"120"
// Base health.
"StatusHealthRegen"
"0.25"
// Health regeneration rate.
"StatusMana"
"0"
// Base mana.
"StatusManaRegen"
"0"
// Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName"
"DOTA_TEAM_BADGUYS"
// Team name.
"CombatClassAttack"
"DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend"
"DOTA_COMBAT_CLASS_DEFEND_SOFT"
"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"
{
"CanRespawn"
"0"
//Basic AI State
//-----------------------------------------------------------------
"DefaultState"
"Invade"
"States"
{
"Invade"
{
"Name"
"Invade"
"Aggression"
"100.0"
"Avoidance"
"0.0"
"Support"
"0.0"
}
}
//Level Up Parameters
//-----------------------------------------------------------------
"HPGain"
"40"
"DamageGain"
"10"
"ArmorGain"
"1"
"MagicResistGain"
"1"
"MoveSpeedGain"
"1"
"BountyGain"
"5"
"XPGain"
"20"
//Ability Usage Parameters
//-----------------------------------------------------------------
}
}
}
теперь в фаил addon_game_mode.lua зададим спав и маршрут
NUMBERTOSPAWN = 8 --How many to spawn
SPAWNLOCATION = "path_customspawn"
WAYPOINTNAME = "path_wp1"
if customSpawn == nil then
customSpawn = class({})
end
function Precache( context )
--Cache the zombie model
PrecacheUnitByNameAsync( "npc_dota_creature_basic_zombie", context )
PrecacheModel( "npc_dota_creature_basic_zombie", context )
end
function customSpawn:spawnunits()
local spawnLocation = Entities:FindByName( nil, SPAWNLOCATION )
local waypointlocation = Entities:FindByName ( nil, WAYPOINTNAME)
local i = 1
while NUMBERTOSPAWN>=i do
--hscript CreateUnitByName( string name, vector origin, bool findOpenSpot, hscript, hscript, int team)
local creature = CreateUnitByName( "npc_dota_creature_basic_zombie" , spawnLocation:GetAbsOrigin() + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS )
print ("create unit has run")
--Sets the waypath to follow. path_wp1 in this example
creature:SetInitialGoalEntity( waypointlocation )
i = i + 1
end
end
function Activate()
GameRules.customSpawn = customSpawn()
GameRules.customSpawn:InitGameMode()
end
function customSpawn:InitGameMode()
self.spawnunits()
end
смысл в том что юниты будут появляться в
path_customspawn и стемиться к path_wp1 в дальнейшем к path_wp2
Нажмите, чтобы раскрыть...
ого, респект тебе)
думаю многим поможет
спасибо-буду пробовать
получится, скину результат
TheAnyKey сказал(а):↑
- 1xблок npc_dota_scripted_spawner задай имя в настройке через alt+enter (path_customspawn) этот (npc_dota_scripted_spawner) - будет точкой спавна
- 2xблок path_corner назави их (path_wp1 и path_wp2). к нему идут крипы path_wp1 а следующий Next Stop Target будет path_wp2
- 1xHero Spawn Location общий 10 человек
Спойлер:в фаил npc_units_custom.txt это наш костум крип ( на пример зумби с холд аута)
// Dota Units File
"DOTAUnits"
{
"Version"
"1"
"npc_dota_creature_basic_zombie"
{
// General
//
"BaseClass"
"npc_dota_creature"
// Class of entity of link to.
"Model"
"models/heroes/undying/undying_minion.vmdl"
// Model.
"SoundSet"
"Undying_Zombie"
// Name of sound set.
"GameSoundsFile"
"soundevents/game_sounds_heroes/game_sounds_undying.vsndevts"
"ModelScale"
".8"
"Level"
"1"
// Abilities
//----------------------------------------------------------------
"Ability1"
""
// Ability 1.
"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"
"3"
// Physical protection.
"MagicalResistance"
"33"
// Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities"
"DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin"
"18"
// Damage range min.
"AttackDamageMax"
"22"
// Damage range max.
"AttackRate"
"1.6"
// Speed of attack.
"AttackAnimationPoint"
"0.3"
// Normalized time in animation cycle to attack.
"AttackAcquisitionRange"
"800"
// Range within a target can be acquired.
"AttackRange"
"128"
// Range within a target can be attacked.
"ProjectileModel"
""
// Particle system model for projectile.
"ProjectileSpeed"
""
// Speed of projectile.
// Bounty
//----------------------------------------------------------------
"BountyXP"
"35"
// Experience earn.
"BountyGoldMin"
"0"
// Gold earned min.
"BountyGoldMax"
"0"
// Gold earned max.
// Bounds
//----------------------------------------------------------------
"RingRadius"
"70"
"HealthBarOffset"
"160"
"BoundsHullName"
"DOTA_HULL_SIZE_SMALL"
// Movement
//----------------------------------------------------------------
"MovementCapabilities"
"DOTA_UNIT_CAP_MOVE_GROUND"
// Type of locomotion - ground, air
"MovementSpeed"
"120"
// Speed
"MovementTurnRate"
"0.5"
// Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth"
"120"
// Base health.
"StatusHealthRegen"
"0.25"
// Health regeneration rate.
"StatusMana"
"0"
// Base mana.
"StatusManaRegen"
"0"
// Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName"
"DOTA_TEAM_BADGUYS"
// Team name.
"CombatClassAttack"
"DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend"
"DOTA_COMBAT_CLASS_DEFEND_SOFT"
"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"
{
"CanRespawn"
"0"
//Basic AI State
//-----------------------------------------------------------------
"DefaultState"
"Invade"
"States"
{
"Invade"
{
"Name"
"Invade"
"Aggression"
"100.0"
"Avoidance"
"0.0"
"Support"
"0.0"
}
}
//Level Up Parameters
//-----------------------------------------------------------------
"HPGain"
"40"
"DamageGain"
"10"
"ArmorGain"
"1"
"MagicResistGain"
"1"
"MoveSpeedGain"
"1"
"BountyGain"
"5"
"XPGain"
"20"
//Ability Usage Parameters
//-----------------------------------------------------------------
}
}
}
теперь в фаил addon_game_mode.lua зададим спав и маршрут
NUMBERTOSPAWN = 8 --How many to spawn
SPAWNLOCATION = "path_customspawn"
WAYPOINTNAME = "path_wp1"
if customSpawn == nil then
customSpawn = class({})
end
function Precache( context )
--Cache the zombie model
PrecacheUnitByNameAsync( "npc_dota_creature_basic_zombie", context )
PrecacheModel( "npc_dota_creature_basic_zombie", context )
end
function customSpawn:spawnunits()
local spawnLocation = Entities:FindByName( nil, SPAWNLOCATION )
local waypointlocation = Entities:FindByName ( nil, WAYPOINTNAME)
local i = 1
while NUMBERTOSPAWN>=i do
--hscript CreateUnitByName( string name, vector origin, bool findOpenSpot, hscript, hscript, int team)
local creature = CreateUnitByName( "npc_dota_creature_basic_zombie" , spawnLocation:GetAbsOrigin() + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS )
print ("create unit has run")
--Sets the waypath to follow. path_wp1 in this example
creature:SetInitialGoalEntity( waypointlocation )
i = i + 1
end
end
function Activate()
GameRules.customSpawn = customSpawn()
GameRules.customSpawn:InitGameMode()
end
function customSpawn:InitGameMode()
self.spawnunits()
end
смысл в том что юниты будут появляться в
path_customspawn и стемиться к path_wp1 в дальнейшем к path_wp2
Нажмите, чтобы раскрыть...
а можешь еще подсказать как задать определенный пул героев при пике?
TheAnyKey сказал(а):↑
- 1xблок npc_dota_scripted_spawner задай имя в настройке через alt+enter (path_customspawn) этот (npc_dota_scripted_spawner) - будет точкой спавна
- 2xблок path_corner назави их (path_wp1 и path_wp2). к нему идут крипы path_wp1 а следующий Next Stop Target будет path_wp2
- 1xHero Spawn Location общий 10 человек
Спойлер:в фаил npc_units_custom.txt это наш костум крип ( на пример зумби с холд аута)
// Dota Units File
"DOTAUnits"
{
"Version"
"1"
"npc_dota_creature_basic_zombie"
{
// General
//
"BaseClass"
"npc_dota_creature"
// Class of entity of link to.
"Model"
"models/heroes/undying/undying_minion.vmdl"
// Model.
"SoundSet"
"Undying_Zombie"
// Name of sound set.
"GameSoundsFile"
"soundevents/game_sounds_heroes/game_sounds_undying.vsndevts"
"ModelScale"
".8"
"Level"
"1"
// Abilities
//----------------------------------------------------------------
"Ability1"
""
// Ability 1.
"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"
"3"
// Physical protection.
"MagicalResistance"
"33"
// Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities"
"DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin"
"18"
// Damage range min.
"AttackDamageMax"
"22"
// Damage range max.
"AttackRate"
"1.6"
// Speed of attack.
"AttackAnimationPoint"
"0.3"
// Normalized time in animation cycle to attack.
"AttackAcquisitionRange"
"800"
// Range within a target can be acquired.
"AttackRange"
"128"
// Range within a target can be attacked.
"ProjectileModel"
""
// Particle system model for projectile.
"ProjectileSpeed"
""
// Speed of projectile.
// Bounty
//----------------------------------------------------------------
"BountyXP"
"35"
// Experience earn.
"BountyGoldMin"
"0"
// Gold earned min.
"BountyGoldMax"
"0"
// Gold earned max.
// Bounds
//----------------------------------------------------------------
"RingRadius"
"70"
"HealthBarOffset"
"160"
"BoundsHullName"
"DOTA_HULL_SIZE_SMALL"
// Movement
//----------------------------------------------------------------
"MovementCapabilities"
"DOTA_UNIT_CAP_MOVE_GROUND"
// Type of locomotion - ground, air
"MovementSpeed"
"120"
// Speed
"MovementTurnRate"
"0.5"
// Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth"
"120"
// Base health.
"StatusHealthRegen"
"0.25"
// Health regeneration rate.
"StatusMana"
"0"
// Base mana.
"StatusManaRegen"
"0"
// Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName"
"DOTA_TEAM_BADGUYS"
// Team name.
"CombatClassAttack"
"DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend"
"DOTA_COMBAT_CLASS_DEFEND_SOFT"
"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"
{
"CanRespawn"
"0"
//Basic AI State
//-----------------------------------------------------------------
"DefaultState"
"Invade"
"States"
{
"Invade"
{
"Name"
"Invade"
"Aggression"
"100.0"
"Avoidance"
"0.0"
"Support"
"0.0"
}
}
//Level Up Parameters
//-----------------------------------------------------------------
"HPGain"
"40"
"DamageGain"
"10"
"ArmorGain"
"1"
"MagicResistGain"
"1"
"MoveSpeedGain"
"1"
"BountyGain"
"5"
"XPGain"
"20"
//Ability Usage Parameters
//-----------------------------------------------------------------
}
}
}
теперь в фаил addon_game_mode.lua зададим спав и маршрут
NUMBERTOSPAWN = 8 --How many to spawn
SPAWNLOCATION = "path_customspawn"
WAYPOINTNAME = "path_wp1"
if customSpawn == nil then
customSpawn = class({})
end
function Precache( context )
--Cache the zombie model
PrecacheUnitByNameAsync( "npc_dota_creature_basic_zombie", context )
PrecacheModel( "npc_dota_creature_basic_zombie", context )
end
function customSpawn:spawnunits()
local spawnLocation = Entities:FindByName( nil, SPAWNLOCATION )
local waypointlocation = Entities:FindByName ( nil, WAYPOINTNAME)
local i = 1
while NUMBERTOSPAWN>=i do
--hscript CreateUnitByName( string name, vector origin, bool findOpenSpot, hscript, hscript, int team)
local creature = CreateUnitByName( "npc_dota_creature_basic_zombie" , spawnLocation:GetAbsOrigin() + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS )
print ("create unit has run")
--Sets the waypath to follow. path_wp1 in this example
creature:SetInitialGoalEntity( waypointlocation )
i = i + 1
end
end
function Activate()
GameRules.customSpawn = customSpawn()
GameRules.customSpawn:InitGameMode()
end
function customSpawn:InitGameMode()
self.spawnunits()
end
смысл в том что юниты будут появляться в
path_customspawn и стемиться к path_wp1 в дальнейшем к path_wp2
Нажмите, чтобы раскрыть...
Красава, если бы не дневной лимит лайков - запилил бы тебе лойс
TheAnyKey сказал(а):↑
- 1xблок npc_dota_scripted_spawner задай имя в настройке через alt+enter (path_customspawn) этот (npc_dota_scripted_spawner) - будет точкой спавна
- 2xблок path_corner назави их (path_wp1 и path_wp2). к нему идут крипы path_wp1 а следующий Next Stop Target будет path_wp2
- 1xHero Spawn Location общий 10 человек
Спойлер:в фаил npc_units_custom.txt это наш костум крип ( на пример зумби с холд аута)
// Dota Units File
"DOTAUnits"
{
"Version"
"1"
"npc_dota_creature_basic_zombie"
{
// General
//
"BaseClass"
"npc_dota_creature"
// Class of entity of link to.
"Model"
"models/heroes/undying/undying_minion.vmdl"
// Model.
"SoundSet"
"Undying_Zombie"
// Name of sound set.
"GameSoundsFile"
"soundevents/game_sounds_heroes/game_sounds_undying.vsndevts"
"ModelScale"
".8"
"Level"
"1"
// Abilities
//----------------------------------------------------------------
"Ability1"
""
// Ability 1.
"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"
"3"
// Physical protection.
"MagicalResistance"
"33"
// Magical protection.
// Attack
//----------------------------------------------------------------
"AttackCapabilities"
"DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin"
"18"
// Damage range min.
"AttackDamageMax"
"22"
// Damage range max.
"AttackRate"
"1.6"
// Speed of attack.
"AttackAnimationPoint"
"0.3"
// Normalized time in animation cycle to attack.
"AttackAcquisitionRange"
"800"
// Range within a target can be acquired.
"AttackRange"
"128"
// Range within a target can be attacked.
"ProjectileModel"
""
// Particle system model for projectile.
"ProjectileSpeed"
""
// Speed of projectile.
// Bounty
//----------------------------------------------------------------
"BountyXP"
"35"
// Experience earn.
"BountyGoldMin"
"0"
// Gold earned min.
"BountyGoldMax"
"0"
// Gold earned max.
// Bounds
//----------------------------------------------------------------
"RingRadius"
"70"
"HealthBarOffset"
"160"
"BoundsHullName"
"DOTA_HULL_SIZE_SMALL"
// Movement
//----------------------------------------------------------------
"MovementCapabilities"
"DOTA_UNIT_CAP_MOVE_GROUND"
// Type of locomotion - ground, air
"MovementSpeed"
"120"
// Speed
"MovementTurnRate"
"0.5"
// Turning rate.
// Status
//----------------------------------------------------------------
"StatusHealth"
"120"
// Base health.
"StatusHealthRegen"
"0.25"
// Health regeneration rate.
"StatusMana"
"0"
// Base mana.
"StatusManaRegen"
"0"
// Mana regeneration rate.
// Team
//----------------------------------------------------------------
"TeamName"
"DOTA_TEAM_BADGUYS"
// Team name.
"CombatClassAttack"
"DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend"
"DOTA_COMBAT_CLASS_DEFEND_SOFT"
"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"
{
"CanRespawn"
"0"
//Basic AI State
//-----------------------------------------------------------------
"DefaultState"
"Invade"
"States"
{
"Invade"
{
"Name"
"Invade"
"Aggression"
"100.0"
"Avoidance"
"0.0"
"Support"
"0.0"
}
}
//Level Up Parameters
//-----------------------------------------------------------------
"HPGain"
"40"
"DamageGain"
"10"
"ArmorGain"
"1"
"MagicResistGain"
"1"
"MoveSpeedGain"
"1"
"BountyGain"
"5"
"XPGain"
"20"
//Ability Usage Parameters
//-----------------------------------------------------------------
}
}
}
теперь в фаил addon_game_mode.lua зададим спав и маршрут
NUMBERTOSPAWN = 8 --How many to spawn
SPAWNLOCATION = "path_customspawn"
WAYPOINTNAME = "path_wp1"
if customSpawn == nil then
customSpawn = class({})
end
function Precache( context )
--Cache the zombie model
PrecacheUnitByNameAsync( "npc_dota_creature_basic_zombie", context )
PrecacheModel( "npc_dota_creature_basic_zombie", context )
end
function customSpawn:spawnunits()
local spawnLocation = Entities:FindByName( nil, SPAWNLOCATION )
local waypointlocation = Entities:FindByName ( nil, WAYPOINTNAME)
local i = 1
while NUMBERTOSPAWN>=i do
--hscript CreateUnitByName( string name, vector origin, bool findOpenSpot, hscript, hscript, int team)
local creature = CreateUnitByName( "npc_dota_creature_basic_zombie" , spawnLocation:GetAbsOrigin() + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS )
print ("create unit has run")
--Sets the waypath to follow. path_wp1 in this example
creature:SetInitialGoalEntity( waypointlocation )
i = i + 1
end
end
function Activate()
GameRules.customSpawn = customSpawn()
GameRules.customSpawn:InitGameMode()
end
function customSpawn:InitGameMode()
self.spawnunits()
end
смысл в том что юниты будут появляться в
path_customspawn и стемиться к path_wp1 в дальнейшем к path_wp2
Нажмите, чтобы раскрыть...
Огромное спасибо, но вот только теперь когда убиваешь этот лагерь он не спавниться, окей, как сделать что бы крип который умер, появлялся снова - это первое, а второе - как сделать что бы крипы не выходили за пределы какой либо зоны. Спасибо. Можно не писать полностью код, главное правильно намекнуть. Еще раз, спасибо.
FrostJkeee сказал(а):↑Огромное спасибо, но вот только теперь когда убиваешь этот лагерь он не спавниться, окей, как сделать что бы крип который умер, появлялся снова - это первое, а второе - как сделать что бы крипы не выходили за пределы какой либо зоны. Спасибо. Можно не писать полностью код, главное правильно намекнуть. Еще раз, спасибо.Нажмите, чтобы раскрыть...
думаю, чтобы не выходили, это можно сделать с помощью триггера
Тема закрыта
-
ЗаголовокОтветов ПросмотровПоследнее сообщение
-
Skiffersan 21 Dec 2024 в 15:27Сообщений: 1 21 Dec 2024 в 15:27
Сообщений:1
Просмотров:5
-
Сообщений:6
Просмотров:22
-
Сообщений:15
Просмотров:39
-
Сообщений:7
Просмотров:23
-
внук берии 21 Dec 2024 в 14:31Сообщений: 5 21 Dec 2024 в 14:31
Сообщений:5
Просмотров:32