L2ck_
L2ck_
PDCPlayerRealms developerS Community
Created by L2ck_ on 3/25/2024 in #help-forum
向いた方向の一番近い草ブロックの上にarmor standが出したい
function TeleportStand(p: player, t: entity type):
execute {_p} command "/execute as %{_t}% at %{_p}% run tp ^ ^ ^%{standtpblocks}%"
add 0.1 to {standtpblocks}
if block at {_t} is grass block:
else:
set {standtpblocks} to 0
every ticks:
loop all players:
if {placestand.global} is not set:
set {placestand.global} to 0
if {placestand.%loop-player%} is not set:
set {placestand.%loop-player%} to {placestand.global}+1
add 1 to {placestand.global}
loop all entities:
if {placestand.%loop-entity-2%} > 0:
if block at loop-entity-2 is grass block:
set {ministandlocation_x} to x-coordinate of loop-entity-2
set {ministandlocation_y} to y-coordinate of loop-entity-2
add 1 to {ministandlocation_y}
set {ministandlocation_z} to z-coordinate of loop-entity-2
execute console command "/summon minecraft:armor_stand %{ministandlocarion_x}% %{ministandlocarion_y}% %{ministandlocarion_z}% {Small:1b}"
if {placestand.%loop-player%} > 0:
if {placestand.%loop-player%} = {placestand.%loop-entity-2%}:
broadcast "a"
TeleportStand(loop-player, loop-entity-2)
stop
summon an armor stand at loop-player:
set {placestand.%event-entity%} to {placestand.%player%}
function TeleportStand(p: player, t: entity type):
execute {_p} command "/execute as %{_t}% at %{_p}% run tp ^ ^ ^%{standtpblocks}%"
add 0.1 to {standtpblocks}
if block at {_t} is grass block:
else:
set {standtpblocks} to 0
every ticks:
loop all players:
if {placestand.global} is not set:
set {placestand.global} to 0
if {placestand.%loop-player%} is not set:
set {placestand.%loop-player%} to {placestand.global}+1
add 1 to {placestand.global}
loop all entities:
if {placestand.%loop-entity-2%} > 0:
if block at loop-entity-2 is grass block:
set {ministandlocation_x} to x-coordinate of loop-entity-2
set {ministandlocation_y} to y-coordinate of loop-entity-2
add 1 to {ministandlocation_y}
set {ministandlocation_z} to z-coordinate of loop-entity-2
execute console command "/summon minecraft:armor_stand %{ministandlocarion_x}% %{ministandlocarion_y}% %{ministandlocarion_z}% {Small:1b}"
if {placestand.%loop-player%} > 0:
if {placestand.%loop-player%} = {placestand.%loop-entity-2%}:
broadcast "a"
TeleportStand(loop-player, loop-entity-2)
stop
summon an armor stand at loop-player:
set {placestand.%event-entity%} to {placestand.%player%}
4 replies
PDCPlayerRealms developerS Community
Created by L2ck_ on 3/18/2024 in #help-forum
minecraftのスコアボードのスコア条件をskript内で作る方法
minecraftのscoreboardコマンドで操作できる2つのスコア(A,Bとする)について AがBよりも大きければ〜のようなことができれば教えてもらいたいです
6 replies
PDCPlayerRealms developerS Community
Created by L2ck_ on 3/16/2024 in #help-forum
guiを開いた状態でのクリックの左右の検知がしたい
on inventory right click:のようなことがしたいのですが方法が見当たらないので教えてもらいたいです...
4 replies