Hey im having some trouble with this code what i want it to do is.
- Spawn melons in waves
- Each wave the number of melons increase
- That about it.
so shouldnt this work?
[lua]function Wave1()
local wtfbbq = ents.Create (“melonhound”)
local melonz = ents.FindByClass(“melonhound”)
wtfbbq:SetPos(Vector(-663.183899, 361.502594, 69.248375))
wtfbbq:SetPos(Vector(283.170044, 2528.408936, 160.031250))
wtfbbq:SetPos(Vector(-1927.218994, 2670.492676, 96.031250))
wtfbbq:SetPos(Vector(-1264.542236, -398.132141, 194.282822))
wtfbbq:Spawn()
if #melonz >= 40 then
timer.Stop(“MelonRaid1”)
else
HUD_PRINTCENTER(“Teh Melonz are coming!”)
timer.Start(“MelonRaid1”)
end
end
function Wave2()
local wtfbbq = ents.Create (“melonhound”)
local melonz = ents.FindByClass(“melonhound”)
wtfbbq:SetPos(Vector(-663.183899, 361.502594, 69.248375))
wtfbbq:SetPos(Vector(283.170044, 2528.408936, 160.031250))
wtfbbq:SetPos(Vector(-1927.218994, 2670.492676, 96.031250))
wtfbbq:SetPos(Vector(-1264.542236, -398.132141, 194.282822))
wtfbbq:Spawn()
if #melonz >= 80 then
timer.Stop(“MelonRaid2”)
else
HUD_PRINTCENTER(“Teh Melonz are coming!”)
timer.Start(“MelonRaid1”)
end
end
timer.Create( “MelonRaid1”, 1, 0, Wave1)
timer.Create( “MelonRaid2”, 1, 0, Wave2)[/lua]