Vhone dc73ee51d49946dabf4f634c6e3ce5c6
분야 | 스크립트 |
---|---|
장르 | 개발자 툴 |
게임버전 | 모든버전 |
API | 스피곳, 페이퍼 |
자료글 | https://github.com/SkriptLang/Skript |
function getLocations(start:location, end:location) :: locations:
set {_v} to vector between {_start} and {_end}
set {_c::*} to x of {_v} and y of {_v}, z of {_v}
set {_abs::*} to abs( {_c::1} ) and abs( {_c::2} ), abs( {_c::3} )
set {_size::*} to {_abs::1} + 1 and {_abs::2} + 1, {_abs::3} + 1
set {_drt::*} to {_c::1} / {_abs::1} and {_c::2} / {_abs::2}, {_c::3} / {_abs::3}
set {_l} to {_start}
loop {_size::1} times:
loop {_size::2} times:
loop {_size::3} times:
set {_loc::%{_l}%} to {_l}
add {_drt::3} to z-coord of {_l}
set z-coord of {_l} to z-coord of {_start}
add {_drt::2} to y-coord of {_l}
set y-coord of {_l} to y-coord of {_start}
add {_drt::1} to x-coord of {_l}
return {_loc::*}
두 대각꼭지점 좌표로 직육면체 영역의 좌표를 가져오는 함수입니다.
기본 함수 asb와 표현식 vector가 사용되었습니다.
코드 보시고 분석해 보시라고 설명은 하지않겠습니다.
질문은 언제나 환영입니다 ㅎ
* 해당 코드의 질문은 덧글로,
* 다른 스크립트 질문은 [이곳]에 올려주세요.
YTgodcheon
2023.06.101.19.2 , 2.6.4 버전인데요. 가져온 좌표를 다른 변수에 집어 넣고 싶은데 어떻게해야할까요?