Forums » StepMania Development » Color-coded lifebars

1
So I have two lifebar graphics for each player, each in their distinct color (in particular, blue and gold). It works correctly in single-player, but add a second to the equation, and they're both the same color. specifically the 2p one. (uh oh)

LifeMeterBar over.lua

local t = Def.ActorFrame {};

t[#t+1] = LoadActor("_p1life") .. {
InitCommand=cmd(player,PLAYER_1);
};

t[#t+1] = LoadActor("_p2life") .. {
InitCommand=cmd(player,PLAYER_2);
};

return t

Last edited: 18 December 2013 8:42am

Reply
Are the "_p1life" and "_p2life" files actually different? The code you posted doesn't set the color of the actors directly at all, it just sets them to visible or not based on whether each player is human.
< cybik> til Kyzentun fixes bugs for breakfast
--
< maxvg1> shakesoda: then why do i still play lol
<@shakesoda> because you're an ITG player. And thus, a masochist
--
<@shakesoda> Kyzentun: I think you might need to put down the meshes for a bit
Reply
check ultralight, I had to do it a different way (white graphic + coloring in the metrics). although that way doesn't want to seem to work for some people (DirectX?)
Reply
Are the "_p1life" and "_p2life" files actually different? The code you posted doesn't set the color of the actors directly at all, it just sets them to visible or not based on whether each player is human.

Yes they are. I have certain ways I styled them so they're separate files.

Like I said, it works if there's one player, but if there's two, they're both the same.
Reply
it'd really help if we knew what they actually were.
Reply
it'd really help if we knew what they actually were.

The LifeMeterBar over.png was replaced by a LifeMeterBar over.lua, which points to two variations of the lifebar frame graphic.
Reply