A slightly automated version of BPMDisplay that automatically updates the text to the BPM range from a given player.
Def.SongBPMDisplay{
Player = PLAYER_1,
}
Name | Type | Action |
---|---|---|
Player | PlayerNumber | The player to obtain the current BPM from. |
This actor inherits the attributes from BitmapText.
These functions also work on BPMDisplay.
SetFromGameState
Obtains the current BPM information from the song or course.
If the song is from an extra stage, it will report it as a random value instead.
self:SetFromGameState()
SetFromSong
(Song pSong)
Sets the BPM to the song's BPM range. This value can be tricked if the chart is using a specified BPM rather than the actual BPM,
or even jumbled if it's tagged as random.
local song = GAMESTATE:GetCurrentSong()
if song then
self:SetFromSong(song)
end
SetFromSteps
(Steps data)
Sets the BPM to the steps's BPM range. Useful if the current steps contain different timing data.
local steps = GAMESTATE:GetCurrentSteps(PLAYER_1)
if steps then
self:SetFromSteps(steps)
end
SetFromCourse
(Course pCourse)
Obtains the BPM range from the course. A couple of rules are applied here:
Common::MaxCourseEntriesBeforeShowVarious
(Default: 10
), the course is considered various, and insteadBPMDisplay::VariousText
(Default: "000"
).local course = GAMESTATE:GetCurrentCourse()
if course then
self:SetFromCourse(course)
end
GetText
Gets the current value that the SongBPMDisplay contains.
-- Let's assume the song currently has a BPM of 180.
Trace( self:GetText() ) -- Returns 180