Logo

[SM5] Need help with Profile Screen function

Register Log In Back To Forums

Post #1 · Posted at 2018-08-29 07:08:50am 5.6 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
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.
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 5% · Database: 4% · Server Time: 2024-04-19 01:21:27
This page took 0.003 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language