Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Required by components/index
- if SpawnLaneCreeps == nil then
- DebugPrint ( '[lane_creeps/spawn] spawning lane creeps' )
- SpawnLaneCreeps = class({})
- end
- local LaneSpawnInterval = 30.0
- function SpawnLaneCreeps:Init ()
- DebugPrint ( '[lane_creeps/spawn] initialize' )
- SpawnLaneCreeps = self
- Timers:CreateTimer(Dynamic_Wrap(SpawnLaneCreeps, 'LaneCreepTimer'))
- end
- function SpawnLaneCreeps:LaneCreepTimer ()
- print ('LaneCreepTimer')
- SpawnAirCreeps()
- SpawnFireCreeps()
- SpawnWaterCreeps()
- SpawnEarthCreeps()
- return LaneSpawnInterval
- end
- function SpawnAirCreeps()
- local point = Entities:FindByName( nil, "point_cc_fire_spawn"):GetAbsOrigin()
- local point2 = Entities:FindByName( nil, "point_cc_fire"):GetAbsOrigin()
- local point3 = Entities:FindByName( nil, "point_9_oclock"):GetAbsOrigin()
- local units_to_spawn = 3
- for i=1,units_to_spawn do
- Timers:CreateTimer(function()
- local unit = CreateUnitByName("npc_dota_creep_air_melee", point+RandomVector(RandomInt(100,200)), true, nil, nil, DOTA_TEAM_GOODGUYS)
- ExecuteOrderFromTable({ UnitIndex = unit:GetEntityIndex(),
- OrderType = DOTA_UNIT_ORDER_ATTACK_MOVE,
- Position = point2, Queue = true})
- ExecuteOrderFromTable({ UnitIndex = unit:GetEntityIndex(),
- OrderType = DOTA_UNIT_ORDER_ATTACK_MOVE,
- Position = point3, Queue = true})
- end)
- end
- end
- function SpawnFireCreeps()
- end
- function SpawnWaterCreeps()
- end
- function SpawnEarthCreeps()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement