Solved Auto updating sign?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Efnilite

Supporter
May 12, 2018
218
15
18
How to auto update a sign? I tried this but it didnt work:

code_language.skript:
command /test:
   trigger:
      set {gamesign::1} to line 2 of targeted block
      set {gamesign::2} to line 4 of targeted block

every second:
    if {countdown} = true:
        set line 2 of {gamesign::1} to "&6Starting.."
        set line 4 of {gamesign::2} to "&7%size of {players::*}%/{@maxplayers}"
    else if {wait} = true:
        set line 2 of {gamesign::2} to "&aWaiting.."
        set line 4 of {gamesign::2} to "&7%size of {players::*}%/{@maxplayers}"

I'm running dev32d, and I have the addons: (and im running 1.12)
- SkQuery-Lime
- SkUtils
- TuSKe
- SkRayFall
- PirateSk
- MundoSK
- SkDragon
- Skellet
Yes I know, a lot of addons (and using latest versions of all of them)
 
Set a variable to the sign itself, and use it in your every second event (line 1 of {gamesign})
 
code_language.skript:
command /test:
    trigger:
        targeted block is a sign
        set {gamesign} to targeted block
        
every second:
    set line 4 of {gamesign} to "&7%size of {players::*}%/{@maxplayers}"
    if {countdown} is true:
        set line 2 of {gamesign} to "&6Starting.."
    else if {wait} is true:
        set line 2 of {gamesign} to "&aWaiting.."
 
every second -_-, make a function and execute it when you change the game status and when a player joins/leaves
 
Status
Not open for further replies.