Announcement

Collapse
No announcement yet.

SetSound3DLocation seemingly doesn't do anything

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SetSound3DLocation seemingly doesn't do anything

    Trying to set the location of a Sound3D every gametick to the location of the car that is being driven, to mimic a car radio. Both the car ("carplaying") and the Sound3D ("radio") are global variables that hold the id's. As of writing using SetSound3DLocation doesn't do anything. I first chalked it up to me making a mistake but the game has no problem accessing the car and sound variables and comparing the location of the two. Not entirely convinced I haven't made a mistake but figured I'd post it anyway. Here's the code where I try to change the location of the sound:

    Code:
            local x, y, z = GetVehicleLocation(carplaying)
            if GetVehicleLocation(carplaying) ~= GetSound3DLocation(radio) then
                SetSound3DLocation(radio, x, y, z)
                AddPlayerChat("Radio id ="..radio..".")
                AddPlayerChat("Radio: "..GetSound3DLocation(radio))
                AddPlayerChat("Car id ="..carplaying..".")
                AddPlayerChat("Car: "..GetVehicleLocation(carplaying))
            end

    #2
    Can confirm it doesn't work and neither does OnSoundFinished, not for 2d projected nor 3d projected sounds.

    Comment


      #3
      Originally posted by madamChloe View Post
      Can confirm it doesn't work and neither does OnSoundFinished, not for 2d projected nor 3d projected sounds.
      Ah, didn't even know there was an OnSoundFinished. I notified Talos yesterday who said he'd take a look when he could.

      Comment


        #4
        Thanks. Was fixed in 1.0.3 I think.

        Comment


          #5
          Originally posted by Talos View Post
          Thanks. Was fixed in 1.0.3 I think.
          Yessiree, and I'm very grateful for that =D

          Comment

          Working...
          X