優
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
if {_x} start with "~":
replace all "~" in {_x} with ""
set {_x} to {_x} parsed as number
set {_locX} to x location of {_player} + {_x}
set {_player} to player
else:
set {_x} to {_x} parsed as number
set {_locX} to {_x}
set {_x} to arg-3
if {_y} start with "~":
replace all "~" in {_y} with ""
set {_y} to {_y} parsed as number
set {_locY} to y location of {_player} + {_y}
set {_player} to player
else:
set {_y} to {_y} parsed as number
set {_locY} to {_y}
set {_y} to arg-4
if {_z} start with "~":
replace all "~" in {_z} with ""
set {_z} to {_z} parsed as number
set {_locZ} to z location of {_player} + {_z}
set {_player} to player
else:
set {_z} to {_z} parsed as number
set {_locZ} to {_z}
set {_z} to arg-5
teleport player to location at arg-3, arg-4, arg-5
if {_x} start with "~":
replace all "~" in {_x} with ""
set {_x} to {_x} parsed as number
set {_locX} to x location of {_player} + {_x}
set {_player} to player
else:
set {_x} to {_x} parsed as number
set {_locX} to {_x}
set {_x} to arg-3
if {_y} start with "~":
replace all "~" in {_y} with ""
set {_y} to {_y} parsed as number
set {_locY} to y location of {_player} + {_y}
set {_player} to player
else:
set {_y} to {_y} parsed as number
set {_locY} to {_y}
set {_y} to arg-4
if {_z} start with "~":
replace all "~" in {_z} with ""
set {_z} to {_z} parsed as number
set {_locZ} to z location of {_player} + {_z}
set {_player} to player
else:
set {_z} to {_z} parsed as number
set {_locZ} to {_z}
set {_z} to arg-5
teleport player to location at arg-3, arg-4, arg-5
こういうことですか?
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
代入って
set {_x} to arg-3
set {_x} to arg-3
これで合ってます?
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
command /sktp [<player>] [<player>] [<number>] [<number>] [<number>]:
trigger:
if arg-1 and arg-2 is not set:
teleport player to location at arg-3, arg-4, arg-5
send "&b%player%を座標%arg-3% %arg-4% %arg-5%にテレポートしました!"
if arg-1 and arg-2 is set:
teleport arg-1 to arg-2
send "&b%player%を%arg-2%にテレポートしました!"

if {_x} start with "~":
replace all "~" in {_x} with ""
set {_x} to {_x} parsed as number
set {_locX} to x location of {_player} + {_x}
else:
set {_x} to {_x} parsed as number
set {_locX} to {_x}
if {_y} start with "~":
replace all "~" in {_y} with ""
set {_y} to {_y} parsed as number
set {_locY} to y location of {_player} + {_y}
else:
set {_y} to {_y} parsed as number
set {_locY} to {_y}
if {_z} start with "~":
replace all "~" in {_z} with ""
set {_z} to {_z} parsed as number
set {_locZ} to z location of {_player} + {_z}
else:
set {_z} to {_z} parsed as number
set {_locZ} to {_z}
teleport player to location at {_x}, {_y}, {_z}
command /sktp [<player>] [<player>] [<number>] [<number>] [<number>]:
trigger:
if arg-1 and arg-2 is not set:
teleport player to location at arg-3, arg-4, arg-5
send "&b%player%を座標%arg-3% %arg-4% %arg-5%にテレポートしました!"
if arg-1 and arg-2 is set:
teleport arg-1 to arg-2
send "&b%player%を%arg-2%にテレポートしました!"

if {_x} start with "~":
replace all "~" in {_x} with ""
set {_x} to {_x} parsed as number
set {_locX} to x location of {_player} + {_x}
else:
set {_x} to {_x} parsed as number
set {_locX} to {_x}
if {_y} start with "~":
replace all "~" in {_y} with ""
set {_y} to {_y} parsed as number
set {_locY} to y location of {_player} + {_y}
else:
set {_y} to {_y} parsed as number
set {_locY} to {_y}
if {_z} start with "~":
replace all "~" in {_z} with ""
set {_z} to {_z} parsed as number
set {_locZ} to z location of {_player} + {_z}
else:
set {_z} to {_z} parsed as number
set {_locZ} to {_z}
teleport player to location at {_x}, {_y}, {_z}
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
今いろいろ試しながらやってるんですけど、どういう風に構文に組み込んであげればいいですかね
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
了解です!
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
わかりました!やってみます
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
y,z座標も同じようにする感じですか?
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
やってみたんですけどわかなかったです...
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
ちょっと自力で組み立ててみます
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
なるほど
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
構文を紹介してもらってできなそうだったら解説してもらってもいいすか?
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
そっちでお願いします
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
それもちょっと考えたんですけど、やり方がわからなかったんですよね
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
そこは調べたのでわかります
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
相対座標のことを今日初めて知ったような人間なので自力は厳しそうです
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
なるほど
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
あーなるほど
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
わかります
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
[<boolean>]ってどういう意味なんですか?
68 replies
PDCPlayerRealms developerS Community
Created by on 1/12/2025 in #help-forum
Skriptで作ったTPコマンドに相対座標を使えるようにしたい
できれば絶対座標も相対座標も/tpにしたいです。
68 replies