Advertisement
Guest User

Untitled

a guest
Jul 7th, 2019
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. --Music Preview
  2. t[#t+1] = Def.Actor{
  3.     CurrentSongChangedMessageCommand=function(self)
  4.         self:queuecommand("Set")
  5.     end;
  6.     SetCommand=function(self)
  7.         local song = GAMESTATE:GetCurrentSong()
  8.         if song then
  9.             local songpath = song:GetMusicPath()
  10.             local sample_start= song:GetSampleStart()
  11.             local sample_len= song:GetSampleLength()
  12.             SOUND:PlayMusicPart(songpath, sample_start, sample_len, 1.5, 1.5, true, true)
  13.         end;
  14.     end;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement