(you'll have to trust me that it's visible. if i set the thickness and corethickness to 10, i can just barely make out faint purple clouds)
weapondef:
Code: Select all
wormlightning = {
areaofeffect = 1,
avoidfeature = false,
minintensity = 1.0,
intensity = 1.0,
beamtime = 1,
beamttl = 30,
corethickness = 0.5,
energypershot = 1,
firestarter = 30,
laserflaresize = 3,
name = "WormLightning",
range = 49,
reloadtime = 1.0,
rgbcolor = "1 0 1",
thickness = 3.0,
tolerance = 10000,
weaponvelocity = 500,
weapontype = "BeamLaser",
damage = {
default = 100,
},
},
Code: Select all
local lx = 0
local lz = 0
local weaponDefID = WeaponDefNames["wormlightning"].id
for ly=0,2000,48 do
local xrand = (2*mRandom()) - 1
local zrand = (2*mRandom()) - 1
local dx = xrand * 48
local dz = zrand * 48
local projectileID = Spring.SpawnProjectile(weaponDefID, {["pos"] = {x+lx, y+ly, z+lz}, ["end"] = {x+lx+dx, y+ly+48, z+lz+dz}, ttl = 15, team = gaiaTeam, maxRange = 49, startAlpha = 1, endAlpha = 1, })
lx = lx + dx
lz = lz + dz
end