The CodeMessageCommand part should be in a BGAnimation-side lua script, e.g.
local t = Def.ActorFrame{
Def.Actor{
Name="CodeController";
CodeMessageCommand=%function(self, param)
Trace("CodeMessageCommand received.")
local codeName = param.Name -- code name, matches the one in metrics
local pn = param.PlayerNumber -- which player entered the code
end
};
};
Can I hide or show stepinfos as I wish by using this code and other little add-ons?
(Press a button,then they hide.Press again,they show again~)
And more,who can help me with a small function?
I want to let my theme load a special named image in every song folder(e.g. There is a "title.png" in every single song folder.And it will be load by ScreenSelectMusic overlay every time the musicwheel changed.)
I added this in 99 xxx.lua,but it often shows"Dialog: "Lua runtime error: /Themes/Sigma1 -The Blue Dasher-/Scripts/99 xxx.lua:1: unexpected symbol near '?" [LUA_ERROR]"
function HasTitle()
local song = GAMESTATE:GetCurrentSong();
local course = GAMESTATE:GetCurrenCourse();
if song then
local path=song:GetSongDir();
if FILEMAN:DoesFileExist(path.."../title.png") then
return true
else
return false
end
elseif course then
local path=course:GetCourseDir();
if FILEMAN:DoesFileExist(path.."../title.png") then
return true
else
return false
end;
end;
end;
function GetTitlePath()
local song = GAMESTATE:GetCurrentSong();
local course = GAMESTATE:GetCurrenCourse();
local st;
if song then
local path=song:GetSongDir();
if FILEMAN:DoesFileExist(path.."../title.png") then
st = path.."../title.png"
else
st = ~nil
end
elseif course then
local path=course:GetCourseDir();
if FILEMAN:DoesFileExist(path.."../title.png") then
st = path.."../title.png"
else
st = ~nil
end;
end;
return st;
end;
Last edited: 9 February 2014 5:02am
Welcome,Thememaniaians./来吧,主题狂们。
Contact me!QQ:1030110910/欢迎与我联系,QQ:1030110910
Contact me!QQ:1030110910/欢迎与我联系,QQ:1030110910