HU/setSoundPan: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function hu}}
{{Client function hu}}
{{Needs Checking|3D sounds are supposed to pan automatically deppending on the camera position, so how does this function work with 3D sounds? --[[User:AlexTMjugador|AlexTMjugador]] ([[User talk:AlexTMjugador|talk]]) 10:09, 25 May 2014 (UTC)}}
{{Needs Checking_hu|3D sounds are supposed to pan automatically deppending on the camera position, so how does this function work with 3D sounds? --[[User:AlexTMjugador|AlexTMjugador]] ([[User talk:AlexTMjugador|talk]]) 10:09, 25 May 2014 (UTC)}}


Ez a funkció a meghatározott hangelem panszintjének módosítására szolgál.
Ez a funkció a meghatározott hangelem panszintjének módosítására szolgál.

Revision as of 12:43, 11 August 2018

Dialog-information.png Ez a cikk ellenőrzésre szorul.

Ok(ok): 3D sounds are supposed to pan automatically deppending on the camera position, so how does this function work with 3D sounds? --AlexTMjugador (talk) 10:09, 25 May 2014 (UTC)

Ez a funkció a meghatározott hangelem panszintjének módosítására szolgál.

Szintaxis

bool setSoundPan ( element theSound, float pan )

OOP Syntax Help! I don't understand this!

Method: sound:setPan(...)
Variable: .pan
Counterpart: getSoundPan


Kötelező argumentumok

  • theSound: A hanghangelem, amelyiket szeretné módosítani.
  • pan: Egy lebegőpontos szám, mely a kívánt pan szintet jelzi. A tartomány -1.0 (bal)től 1.0 (jobb)-ig terjed.

Visszaadott érték

Visszaad egy true értéket, ha a hangelem pan szintje sikeresen meg lett változtatva, egyébként false.

Példa

Click to collapse [-]
Client
function playMusic ()
        local left = playSFX("genrl", 75, 6, true)    -- Play loading theme music
        local right = playSFX("genrl", 75, 7, true)
        setSoundPan(left, -1)                         -- switch the first music to left channel
        setSoundPan(right, 1)                         -- switch the second music to right channel
end

addCommandHandler("music", playMusic)                 -- add the command handler

Lásd még

Fordította

  • Surge