개인 자료란 (JE)

  서버 커뮤니티

Profile 꼬북꾸이 대표칭호 없음
Profile

이해도 입문자 
게임버전 (JE) 1.16.5 
게임버전 (BE) 관련없음 

on region enter:

    set {sound::%player%::region} to "village"


    if {sound::%player%::play::village} is not set:

        play sound "custom.village" with volume 5 and pitch 1 at player for player


        set {sound::%player%::play::village} to 4 * 60 * 20 

        loop {sound::%player%::play::village} times:

            wait 1 tick

            if {sound::%player%::region} is not "village":

                stop loop

        delete {sound::%player%::play::village}


on region exit:

    set {sound::%player%::region} to "village"


    if {sound::%player%::stop::village} is not set:

        stop sound "custom.village" for player


        set {sound::%player%::stop::village} to true

        wait 1 tick

        delete {sound::%player%::stop::village}


이렇게 해서 village라는 구역에서, village라는 bgm이 나오게 짰습니다..
이렇게 하니 들어갈때 bgm이 나오고 나올때는 안나오게되는데..
여기서 문제는 다른 지역 (ex: village2) 라는 지역을 가면 다른 bgm이 나오게 하고 싶은데 방법을 모르겠습니다..
그냥 저걸 반복해보니, 한번에 여러개의 bgm이 들려버리고...어떻게 해야할까요...?

1개의 댓글

세찐찐
2024.01.25

if region is “”: 과 같이해서 지역을 감지하시면 됩니다

뉴스 및 창작물
/files/thumbnails/384/778/003/262x150.crop.jpg?20240507003327

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240428135129

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

1