Jump to content

object movement


Nahupai

Recommended Posts

Posted
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)

 

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...