Tworzę skrypt do wywoływania efektów wizualnych na graczu, i Skript "nie chce" zapętlić argumentu, czy też zmiennej argumentu (set {zmienna.%player%} to "%arg 2%"). Oto kod:
[spoiler]variables: {wlacznik.%player%} = false {statusEfektu.%player%} = false {nazwaEfektu.%player%} = "" {silaEfektu.%player%} = 1command /efekt [<text>] [<number=1>]: description: A description of what this command does trigger: if arg 1 isn't set: message "Prosze wpisac argument" if "%arg 1%" is "ogien": set {nazwaEfektu.%player%} to mobspawner flames if {wlacznik.%player%} is false: message "Efekt o nazwie %arg 1% zostal wylaczony" set {wlacznik.%player%} to true set {statusEfektu.%player%} to false stop trigger if {wlacznik.%player%} is true: message "Efekt o nazwie %arg 1% zostal wlaczony" set {wlacznik.%player%} to false set {statusEfektu.%player%} to true while player is online: if {statusEfektu.%player%} is true: wait 1 second loop "%arg 2%" times: play {nazwaEfektu.%player%} at the player else: stop trigger
Pytanie
chonsiu 0
Witam.
Tworzę skrypt do wywoływania efektów wizualnych na graczu, i Skript "nie chce" zapętlić argumentu, czy też zmiennej argumentu (set {zmienna.%player%} to "%arg 2%"). Oto kod:
[spoiler]variables: {wlacznik.%player%} = false {statusEfektu.%player%} = false {nazwaEfektu.%player%} = "" {silaEfektu.%player%} = 1command /efekt [<text>] [<number=1>]: description: A description of what this command does trigger: if arg 1 isn't set: message "Prosze wpisac argument" if "%arg 1%" is "ogien": set {nazwaEfektu.%player%} to mobspawner flames if {wlacznik.%player%} is false: message "Efekt o nazwie %arg 1% zostal wylaczony" set {wlacznik.%player%} to true set {statusEfektu.%player%} to false stop trigger if {wlacznik.%player%} is true: message "Efekt o nazwie %arg 1% zostal wlaczony" set {wlacznik.%player%} to false set {statusEfektu.%player%} to true while player is online: if {statusEfektu.%player%} is true: wait 1 second loop "%arg 2%" times: play {nazwaEfektu.%player%} at the player else: stop triggerEdytowane przez chonsiuOdnośnik do komentarza
https://skript.pl/temat/2001-nie-chce-zap%C4%99tli%C4%87-zmiennej-ani-argumentu/Udostępnij na innych stronach
4 odpowiedzi na to pytanie
Rekomendowane odpowiedzi