Una_Nancy_Owen
Una_Nancy_Owen
PDCPlayerRealms developerS Community
Created by Una_Nancy_Owen on 7/22/2024 in #help-forum
Playerの特殊な動作の状態について
No description
6 replies
PDCPlayerRealms developerS Community
Created by Una_Nancy_Owen on 5/28/2024 in #help-forum
関数と変数の問題
mcpaper-1.18.2 Skript-2.8.2 Addon: ProtocolLib, SkBee, Skellett, SkQuery, skRayFall, Skript, skript-reflect とある関数が別の関数内でのみエラーを吐きます 問題の関数は「parring({_loc2}, crit, 2, 20, 1, 0, player, 1, 0)」です 同じ内容の変数を使用している「laser({_loc}, {_loc2}, end rod, 0.2 ,0.01)」の方は問題が出ていないので原因がよく分かりません 両者の詳細: function laser(start:location ,end:location ,type:particle ,length:number ,diff:number): function parring(loc:location ,type:particle ,size:number ,num:number ,dire:number ,delay:number ,p:entity ,keep: number ,wait: number):
function atk(p:player ,r:number ~省略):
if {wcool.%{_p}%} is set:
stop
set {wcool.%{_p}%} to 1
play sound "%{_sound}%" with volume 1 and pitch {_soundpitch} at {_p}
set {_delay} to "%{_delay}% ticks" parsed as a time span
set {_spd} to {_p}'s walk speed
set {_p}'s walk speed to {_delayspdofp}
wait {_delay}
set {_p}'s walk speed to {_spd}
push {_p} forwards at speed {_delayendoffrontpush}
set {_loc} to location of the block 1.5 meter in front of {_p}'s head
if {_parextra} is 0:
make {_paramo} of {_partype} at {_loc} with offset vector(0.01, 0.01, 0.01) with extra 0.01
else if {_parextra} is 1:
set {_loc} to location of the block 0.5 meter in front of {_p}'s head
set {_loc2} to location of the block {_r} meter in front of {_p}'s head
laser({_loc}, {_loc2}, end rod, 0.2 ,0.01)
else if {_parextra} is 2:
set {_loc} to location of the block 0.2 meters in front of {_p}'s head
set y-coordinate of {_loc} to (y-coordinate of {_loc} + 1)
set {_loc2} to location of the block {_r} meters in front of {_p}'s head
set y-coordinate of {_loc2} to (y-coordinate of {_loc2} - 2)
laser({_loc}, {_loc2}, crit, 0.2 ,0.01)
parring({_loc2}, crit, 2, 20, 1, 0, player, 1, 0)
function atk(p:player ,r:number ~省略):
if {wcool.%{_p}%} is set:
stop
set {wcool.%{_p}%} to 1
play sound "%{_sound}%" with volume 1 and pitch {_soundpitch} at {_p}
set {_delay} to "%{_delay}% ticks" parsed as a time span
set {_spd} to {_p}'s walk speed
set {_p}'s walk speed to {_delayspdofp}
wait {_delay}
set {_p}'s walk speed to {_spd}
push {_p} forwards at speed {_delayendoffrontpush}
set {_loc} to location of the block 1.5 meter in front of {_p}'s head
if {_parextra} is 0:
make {_paramo} of {_partype} at {_loc} with offset vector(0.01, 0.01, 0.01) with extra 0.01
else if {_parextra} is 1:
set {_loc} to location of the block 0.5 meter in front of {_p}'s head
set {_loc2} to location of the block {_r} meter in front of {_p}'s head
laser({_loc}, {_loc2}, end rod, 0.2 ,0.01)
else if {_parextra} is 2:
set {_loc} to location of the block 0.2 meters in front of {_p}'s head
set y-coordinate of {_loc} to (y-coordinate of {_loc} + 1)
set {_loc2} to location of the block {_r} meters in front of {_p}'s head
set y-coordinate of {_loc2} to (y-coordinate of {_loc2} - 2)
laser({_loc}, {_loc2}, crit, 0.2 ,0.01)
parring({_loc2}, crit, 2, 20, 1, 0, player, 1, 0)
Variables cannot be used here. 該当部分: parring({_loc2}, crit, 2, 20, 1, 0, player, 1, 0)
6 replies