Page 1 of 1

LUPS:UnitPieceLight questions for JK

Posted: 13 Mar 2014, 04:03
by smoth
so in order to have a quick test,

so I plonked the following in lupsUnitFXs.lua

Code: Select all

	demi3_1 = {
		{class='UnitPieceLight',options	={colormap={{0.8, 0.0, 0.8, 0.01}, {0, 0, 1, 1.0},},color={1.0,1.0,0.0,1.0}, piece="weapon2_a_barrel",}},
		{class='UnitPieceLight',options	={color={1.0,1.0,0.0,1.0}, piece="weapon2_a_barrel",}},
		{class='AirJet',	options={color={1.0,0.4,0.1},width =  -5, length=-31, piece="weapon1_a_barrel"}},	
		{class='AirJet',	options={color={1.0,0.4,0.1},width =  -5, length=-31, piece="weapon2_a_barrel"}},	
		{class='AirJet',	options={color={1.0,0.4,0.1},width =  3, length=20, piece="weapon1_a_barrel"}},	
		{class='AirJet',	options={color={1.0,0.4,0.1},width =  3, length=20, piece="weapon2_a_barrel"}},	
	},
My airjets are working just fine, I am not seeing anything from piecelight. Am I doing it wrong?

What are the valid tags?

I am not sure what I am doing wrong here but when I followed the gfx_lups_manager code and it executes an addparticles call so this table should work fine for unitpiecelight, what am I missing?

Re: LUPS:UnitPieceLight questions for JK

Posted: 13 Mar 2014, 21:29
by jK
LUPS' README wrote: ** What FXClasses exist and how do I know their options? **
All FXClasses are located here:
/lups/ParticleClasses/*
If you open on of those files, you will see a function like this:

function ShieldSphereParticle.GetInfo()
return {
name = "ShieldSphere",
}
end

That returned name is what you fill in %FXCLASS% (uppercase
doesn't matter), also it is in most cases same as the filename.
To see possible options of the FXClass scroll a bit down, you
will find a table like this:

ShieldSphereParticle.Default = {
pos = {0,0,0}, -- start pos
layer = -23,
life = 0, --in frames
size = 0,
sizeGrowth = 0,
margin = 1,
colormap1 = { {0, 0, 0, 0} },
colormap2 = { {0, 0, 0, 0} },
repeatEffect = false,
}

The table contains all options and their default values.

So an example fx placed in LuaUI/Widgets/gfx_lups_manager.lua
could look like this:
[UnitDefNames["armcom"].id] = {
{class='ShieldSphere',options={ life=3000, repeatEffect=true, size=300, colormap1={1,0,0,0.5}, colormap2={0,1,0,0.5} } }
},
UnitPieceLight.lua wrote:UnitPieceLight.Default = {
layer = 32,
life = math.huge,
worldspace = true,

piecenum = 0,

colormap = { {1,1,1,0} },
repeatEffect = true,

--// internal
color = {1,1,1,0},
}
smoth wrote:{class='AirJet', options={color={1.0,0.4,0.1},width = -5, length=-31, piece="weapon1_a_barrel"}},

Re: LUPS:UnitPieceLight questions for JK

Posted: 13 Mar 2014, 22:01
by smoth
Hmm so I need to use a piecenum, I have it set to 4,8 the respective parts... hmm

Code: Select all

{class='UnitPieceLight',options	={colormap={{0.8, 0.0, 0.8, 0.01}, {0, 0, 1, 1.0},},color={1.0,1.0,0.0,1.0}, piecenum =8,}},
{class='UnitPieceLight',options	={color={1.0,1.0,0.0,1.0}, piecenum =4,}},
still nothing. I would say I have the wrong parts but I do an echo. I even disabled the shader for that unit so I know it isn't the shader interfering.