関数と変数の問題

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)

Variables cannot be used here.
: parring({_loc2}, crit, 2, 20, 1, 0, player, 1, 0)
Was this page helpful?