Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxCreeps = 0 -- Variavel Global
- Timers:CreateTimer
- ( 15, -- Start this timer 30 game-time seconds later
- function()
- DebugPrint("This function is called 30 seconds after the game begins, and every 30 seconds thereafter") --escolheSkill()
- function UnitDifficulty()
- end
- )
- =============================================================================================================================
- function UnitDifficulty()
- local difficulty = getDifficulty()
- if difficulty == "Easy" then
- maxCreeps = 5
- end
- if difficulty == "Medium" then
- maxCreeps = 10
- end
- if difficulty == "Hard" then
- maxCreeps = 20
- end
- local i = RandomInt(1, maxCreeps)
- for x=0, i do
- spawnUnit(difficulty)
- end
- end
- =============================================================================================================================
- function spawnUnit(difficulty)
- local creep = selectCreep(difficulty)
- print("selecionou o creep")
- print(tostring(unit))
- local marker = selectMarker()
- print("selecionou o marcador")
- print(tostring(marker))
- print("spawnando")
- local point = Entities:FindByName( nil, marker):GetAbsOrigin()
- local unit = CreateUnitByName(creep, point, true, nil, nil, DOTA_TEAM_CUSTOM_8 )
- local killedUnit = EntIndexToHScript( event.entindex_killed )
- if killedUnit and killedUnit:IsCreep() then
- end
- =============================================================================================================================
- function DotaVerifica (event)
- local killedUnit = EntIndexToHScript( event.entindex_killed )
- if killedUnit and killedUnit:IsCreep() then
- local valor = 0
- valor = valor - maxcreeps
- print(tostring(valor))
- if valor == 0 then
- spawnUnit(difficulty)
- end
- end
- end
- =============================================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement