Post #1 · Posted at 2016-08-31 06:18:03am 7.6 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2016-08-31 06:18am
Hi everyone,
I've been mucking around in SM5 again and I would like to show the Group banner or Jacket for the song currently selected. I've worked out that I can get the songs group name by using: song:GetGroupName(). I'm not sure what I've done wrong in my code below as it's not showing the banner or jacket even though I think it should be?
Any help would be fantastic! Thanks in advance!
Edit: Just noticed if I play a song and come back to the song wheel the jacket for the song group I just played is visible but it doesn't change when I change song or even reload the music select screen.
Nevermind, I got it to work, I just did a bit of hacky stuff for it. For those interested:
I've been mucking around in SM5 again and I would like to show the Group banner or Jacket for the song currently selected. I've worked out that I can get the songs group name by using: song:GetGroupName(). I'm not sure what I've done wrong in my code below as it's not showing the banner or jacket even though I think it should be?
Any help would be fantastic! Thanks in advance!
Quote
t[#t+1] = Def.Banner{
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
InitCommand=cmd(x,330;y,0);
OnCommand=cmd(diffusealpha,0;sleep,0.466;linear,0.05;diffusealpha,1;);
OffCommand=cmd(sleep,0.633;linear,0.05;diffusealpha,0);
SetCommand=function(self)
self:LoadFromSongGroup(song:GetGroupName());
self:zoomtowidth(125)
self:zoomtoheight(125)
self:diffusealpha(0.8)
end;
};
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
InitCommand=cmd(x,330;y,0);
OnCommand=cmd(diffusealpha,0;sleep,0.466;linear,0.05;diffusealpha,1;);
OffCommand=cmd(sleep,0.633;linear,0.05;diffusealpha,0);
SetCommand=function(self)
self:LoadFromSongGroup(song:GetGroupName());
self:zoomtowidth(125)
self:zoomtoheight(125)
self:diffusealpha(0.8)
end;
};
Edit: Just noticed if I play a song and come back to the song wheel the jacket for the song group I just played is visible but it doesn't change when I change song or even reload the music select screen.
Nevermind, I got it to work, I just did a bit of hacky stuff for it. For those interested:
Quote
t[#t+1] = Def.Banner{
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
InitCommand=cmd(x,330;y,0);
OnCommand=cmd(diffusealpha,0;sleep,0.466;linear,0.05;diffusealpha,1;);
OffCommand=cmd(sleep,0.633;linear,0.05;diffusealpha,0);
SetCommand=function(self)
local song2 = GAMESTATE:GetCurrentSong();
self:LoadFromSongGroup(song2:GetGroupName());
self:zoomtowidth(160)
self:zoomtoheight(152)
self:diffusealpha(0.8)
end;
};
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
InitCommand=cmd(x,330;y,0);
OnCommand=cmd(diffusealpha,0;sleep,0.466;linear,0.05;diffusealpha,1;);
OffCommand=cmd(sleep,0.633;linear,0.05;diffusealpha,0);
SetCommand=function(self)
local song2 = GAMESTATE:GetCurrentSong();
self:LoadFromSongGroup(song2:GetGroupName());
self:zoomtowidth(160)
self:zoomtoheight(152)
self:diffusealpha(0.8)
end;
};