개인 자료란 (JE)

  서버 커뮤니티

Profile G0Gl 대표칭호 없음
Profile

질문하기 스크립트

1.20.4 랜덤 텔포 스크립트 질문입니다

2024.02.05 조회 수 107 추천 수 0
이해도 입문자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 
스크립트 버전 Skript 2.8.2 

command /랜덤티피:

    trigger:

        set {_x} to random integer between 1000 and 1000

        set {_z} to random integer between 1000 and 1000

        set {_y} to 255

        set {_loc} to location at {_x}, {_y}, {_z} of the world

        loop 255 times:

            if block at {_loc} is not air:

                add 1 to {_y}

                set {_loc} to location at {_x}, {_y}, {_z} of the world

                teleport player to {_loc}

                stop

            else:

                subtract 1 from {_y}

                set {_loc} to location at {_x}, {_y}, {_z} of the world

                teleport player to {_loc}


유튜브에 있는것을 복붙했는데 인게임 적용시 6, 10, 15라인 (빨간색 부분)이

There's no location in a command event (명령 이벤트에 위치가 없습니다 ) 라고 뜨는데 어떻게 위치를 넣나요?


3개의 댓글

windy_wind
2024.02.05

location(x좌표,y좌표,z좌표,월드)를 사용하세요

예시:

set {_loc} to location({_x},{_y},{_z},player's world)
teleport player to {_loc}
G0Gl
2024.02.05
@windy_wind

어 그냥 set {_loc} to location at {_x}, {_y}, {_z} of the world 에서 뒤에 of the world를 제거하니 됐는데요 잔디블럭에 소환 안되게 하려면 is not air or grass_block이라고 하면되나요?

windy_wind
2024.02.06
@G0Gl

네. 대신 while 쓰셈

뉴스 및 창작물
/files/thumbnails/677/856/003/262x150.crop.jpg?20240913205849

아티클

마인크래프트 개발의 미래

학교가기싫다

2024-09-13

1

사진이 없습니다.

모드

아이리스 쉐이더

gyeol12

2024-09-07

0

/files/thumbnails/382/873/003/262x150.crop.jpg?20240903125347

레드스톤

[노트블럭커버] 숙청행진 - 밀그램

노트블럭전문가

2024-09-03

0

/files/thumbnails/069/864/003/262x150.crop.jpg?20240819102737

레드스톤

[노트블럭커버] 만찬가 - tuki

노트블럭전문가

2024-08-19

1

/files/thumbnails/647/816/003/262x150.crop.jpg?20240619112336

건축

숭례문(프리퀄) 4

KHC

2024-06-19

1