Does anyknow how to put area of caster for spawning units

edited January 29 in General

function spfootman( keys )

local caster = keys.caster

local radius = keys.radius

local spellName = keys.SpellName

local repeat_interval = 2 -- Rerun this timer every *repeat_interval* game-time seconds
local start_after = 1 -- Start this timer *start_after* game-time seconds later

    if  caster:HasAbility(spellName) then
    Timers:CreateTimer(start_after, function()
    return repeat_interval

end end

function SpawnCreeps()

    local caster = self:GetCaster()
    local point = caster:GetAbsOrigin()
    local unit = CreateUnitByName("footman", point, true, nil, nil, DOTA_TEAM_NEUTRALS)


  • Posts: 182

    local point = caster:GetAbsOrigin() + RandomVector(100)