asteroid weapons
Asteroids replace bursts. yea!
- Code:
- function main()
local burstArea = levelgen:findObjectById(2) --1 is the zone ID in this level
local burstAreageom = burstArea:getGeom()
bf:subscribe(Event.Tick)
end
function onTick(delta)
--change hostile bursts into asteroids
local items = {};
bf:findAllObjects(items,
ObjType.Burst);
--Try adding ObjType.Asteroid for a surprise!
for i,item in ipairs(items) do
local pos = item:getPos();
local vel = item:getVel();
local asteroid = Asteroid.new()
asteroid:setPos(pos)
asteroid:setSize(1)
asteroid:setVel(vel)
levelgen:addItem(asteroid)
item:removeFromGame()
end
end
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002
viewtopic.php?f=33&p=21002#p21002