Post #1 · Posté à 2018-08-29 07:08:50am il y a 6 années
leadbman | |
---|---|
Member | |
263 Messages | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2018-08-29 07:08am
Hi all,
I'm working on some profile screen stuff and I want to use this code to show/hide content based on what the users last song group was.
OnCommand=function(self)
local lastgroup = profile:GetLastPlayedSong():GetGroupName()
if lastgroup:find("ddrmax2") then
self:diffusealpha(1);
else
self:diffusealpha(0);
end;
end;
Right now I'm getting nothing showing up, no matter how I change the variables/try things with the code. I'm sure I'm just doing something basic wrong.
I hope someone can help me out!
Ok, so I've been looking further into this - the code I'm working from has this at the top of the Lua file:
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
So I need to get this working near where I'm trying to run this code. I'll have to look more into it when I get home later.
I think I may have worked it out, I just had my actor in the wrong place in my code. I'll keep working on it and see if I can find a proper solution though.
I'm working on some profile screen stuff and I want to use this code to show/hide content based on what the users last song group was.
OnCommand=function(self)
local lastgroup = profile:GetLastPlayedSong():GetGroupName()
if lastgroup:find("ddrmax2") then
self:diffusealpha(1);
else
self:diffusealpha(0);
end;
end;
Right now I'm getting nothing showing up, no matter how I change the variables/try things with the code. I'm sure I'm just doing something basic wrong.
I hope someone can help me out!
Ok, so I've been looking further into this - the code I'm working from has this at the top of the Lua file:
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
So I need to get this working near where I'm trying to run this code. I'll have to look more into it when I get home later.
I think I may have worked it out, I just had my actor in the wrong place in my code. I'll keep working on it and see if I can find a proper solution though.