Guest User

Lua shock arrows indicator on song wheel

a guest
Apr 26th, 2025
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. fixed version
  2.  
  3. local pn = ...
  4. local t = Def.ActorFrame{}
  5.  
  6. t[#t+1] = Def.ActorFrame{
  7.     LoadActor(THEME:GetPathB("ScreenSelectMusic", "overlay/ShockArrows/shock")),
  8.     LoadActor(THEME:GetPathB("ScreenSelectMusic", "overlay/ShockArrows/effect"))..{
  9.         InitCommand=function(s)
  10.             s:diffuseshift()
  11.             s:effectcolor1(color("1,1,1,1")):effectcolor2(color("1,1,1,0.8"))
  12.             s:effectperiod(0.2)
  13.         end,
  14.     },
  15.     InitCommand=function(self)
  16.         self:visible(false) end,
  17.     SetCommand=function(self, param)
  18.         if GAMESTATE:IsCourseMode() then
  19.             return end
  20.  
  21.         local steps = GAMESTATE:GetCurrentSteps(pn)
  22.         local mines = 0
  23.        
  24.         if steps then
  25.             mines = steps:GetRadarValues(pn):GetValue("RadarCategory_Mines")
  26.         end
  27.  
  28.         if param.Song == GAMESTATE:GetCurrentSong() then
  29.             self:visible(mines > 0)
  30.         end
  31.     end,
  32.     CurrentStepsP1ChangedMessageCommand=function(self)
  33.         self:queuecommand("Set") end,
  34.     CurrentStepsP2ChangedMessageCommand=function(self)
  35.         self:queuecommand("Set") end,
  36.     CurrentSongChangedMessageCommand=function(self)
  37.         self:queuecommand("Set") end,
  38. }
  39.  
  40. return t;
Advertisement
Add Comment
Please, Sign In to add comment