BeamLaser only visible in minimap?

BeamLaser only visible in minimap?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
eronoobos
Posts: 73
Joined: 27 Mar 2015, 20:25

BeamLaser only visible in minimap?

Post by eronoobos »

I spawned some BeamLaser projectiles from a gadget, and they are clearly visible in the minimap, but appear about 95% transparent in the main view. What am I missing about BeamLasers, and/or about spawning projectiles in lua?

Image
Image

(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,
		},
	},
gadget:

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
(the team, maxRange, startAlpha, and endAlpha tags don't make any difference)
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: BeamLaser only visible in minimap?

Post by Google_Frog »

Which engine? In my experience beamlaser spawning is broken. This was with 100.0. Try the latest engine and see what you get.
User avatar
eronoobos
Posts: 73
Joined: 27 Mar 2015, 20:25

Re: BeamLaser only visible in minimap?

Post by eronoobos »

This was in 101. I just tried 101.0.1-229-g12259e4, 102.0-RC1, 100, 98, 96, and 94, all with the same result. Thanks for replying.

I took screenshots in rapid succession, compared them using Difference in GIMP, and increased the contrast:
Image Image Image
I'm not crazy!
Post Reply

Return to “Lua Scripts”