does anyone know why is this not working, ability work normaly and cast this script...
Does anyone know why this abilty wont spawn units, It does not show any errors problem is somewhere here...
function spawn( keys )
local caster = keys.caster
local spellName = keys.SpellName
Timers:CreateTimer(5, function()
if caster:HasAbility(spawner7) then
local unit = CreateUnitByName("miligun", position, true, caster , caster , caster:GetTeamNumber())
end
return 1.0
end)
end
Comments
you must be getting errors with that code. spawner7 is undefined, it needs to be a string.
position is also undefined.
you should really read the tutorials https://moddota.com/forums/discussion/135/beginners-guide-to-dota-scripting
I read that many times look:
function spfootman( event )
end
this is working normaly, but if i remove '--' on 'if' and 'end' as u can see then it wont work and yeah i did define ability ;
"RunScript"
{ "ScriptFile" "spawn_footman.lua" "Function" "spfootman" "SpellName" "spawn_footman" }