Nahupai Posted June 1, 2020 Posted June 1, 2020 is there any way to make an object move to the rhythm of the music?
Moderators Tut Posted June 1, 2020 Moderators Posted June 1, 2020 It's better asked in the Scripting section, moving there. Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime - Lao Tzu
Hydra Posted June 1, 2020 Posted June 1, 2020 mysong = playSound3D("song.mp3", 2050.0209960938, 1510.056640625, 10.671875, true) setSoundMaxDistance(mysong, 100) local a = 0 local myObject = createObject(1775, 2050.0209960938, 1510.056640625, 10.671875, -0, 0, 178.50372314453) local ox, oy, oz = getElementPosition(myObject) function animateObject() local animMusic = 0+math.random(-a,a) moveObject(myObject, 1000, ox, oy+animMusic, oz) end addEventHandler("onClientRender", getRootElement(), animateObject) function asd() if mysong then local leftData, rightData = getSoundLevelData(mysong) if (leftData) then a = 3*(leftData/3000) end end end addEventHandler("onClientRender", getRootElement(), asd) Social Media: Discord: Gabriel45#6859 Instagram: https://www.instagram.com/_gabriel_455/ YouTube: Hydra45 (https://www.youtube.com/c/Hydra45/)
Nahupai Posted June 3, 2020 Author Posted June 3, 2020 On 1/6/2020 at 14:53, Hydra said: what I want is that I move to put music with a converted link. (example "music download link") and that is created in the place where the player started the command.
Zorgman Posted June 4, 2020 Posted June 4, 2020 I think this is what you need: https://wiki.multitheftauto.com/wiki/GetSoundWaveData Dystopia alpha 0.75DOWNLOAD
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now