Speeding Music Up With Lua

Status
Not open for further replies.

SeventhSentinel

The 7 man with the 7 plan
Kart Krew™️
Retired Staff
What I want to do is similar to putting SpeedMusic = 1 in a level header, but the music always speeds up too much -- I'd like it to speed up to 1.25 instead of 1.4, and I want it to work in every level without having to put SpeedMusic = 1 in all the level headers. What I have so far is:
Code:
S_SpeedMusic(1*FRACUNIT + FRACUNIT/4)
Which makes whatever music is playing speed up to 1.25, but never does anything else. I'm not sure where to go from here.

---------- Post added at 11:18 AM ---------- Previous post was at 11:10 AM ----------

I now have this code, provided by JTE:
Code:
addHook("ThinkFrame", do
  for player in players.iterate
    if player.powers[pw_sneakers] > 1
      S_SpeedMusic(1*FRACUNIT + FRACUNIT/4)
    end
  end
end)
Which causes the music to speed up whenever anyone in a game has the powerup.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top