#boss bar issues

1 messages · Page 1 of 1 (latest)

vagrant oriole
#

please use code blocks

velvet wharf
#

how

vagrant oriole
#

` surround it in 3 of these

velvet wharf
vagrant oriole
#

I was talking about discord...

#

Oh no wait

#

You edited it

velvet wharf
#

oh

vagrant oriole
#
  delete {bossbar::room1}
  set {miniBossSpawned::room1} to false
  clear {_mobsInRoom1::*}


every 5 seconds in "dungeon2":
  loop all entities in world "dungeon2":
    if {AdungeonMobs::*} contains loop-entity:
      if "%region at loop-entity%" contains "room1":
        add loop-entity to {_mobsInRoom1::*}
        add uuid of loop-entity to {moblist::*}
  set {_room1count} to size of {_mobsInRoom1::*}
  loop all players in world "dungeon2":
    if loop-player is in region "room1":
      create bossbar titled "Room 1" and id "&fMobs remaining: %{_room1count}%" for loop-player with progress 1 with colors white
      set {_room1count} to value of bossbar "Room 1"
  if {_room1count} is 0:
    if {miniBossSpawned::room1} is false:
      wait 2 seconds
      AspawnGhostOnce()
      set {miniBossSpawned::room1} to true

on death:
  if {moblist::*} contains uuid of victim:
    add 1 to {_room1count}   on load:
  delete {bossbar::room1}
  set {miniBossSpawned::room1} to false
  clear {_mobsInRoom1::*}```




anyone know why the boss bar doesnt go up when i kill stuff but instead it keeps making more bossbars and the function at the end is not activating
velvet wharf
#

i fixed it

#

not the skript issue

#

the discord one

vagrant oriole
#

remove all players from {bossbar::room1}

velvet wharf
#

where do i put that

vagrant oriole
#

At the on death

#

Ohh

#
  delete {bossbar::room1}
  set {miniBossSpawned::room1} to false
  clear {_mobsInRoom1::*}


every 5 seconds in "dungeon2":
  loop all entities in world "dungeon2":
    if {AdungeonMobs::*} contains loop-entity:
      if "%region at loop-entity%" contains "room1":
        add loop-entity to {_mobsInRoom1::*}
        add uuid of loop-entity to {moblist::*}
  set {_room1count} to size of {_mobsInRoom1::*}
  loop all players in world "dungeon2":
    if loop-player is in region "room1":
      create bossbar titled "Room 1" and id "&fMobs remaining: %{_room1count}%" for loop-player with progress 1 with colors white
      set {_room1count} to value of bossbar "Room 1"
  if {_room1count} is 0:
    if {miniBossSpawned::room1} is false:
      wait 2 seconds
      AspawnGhostOnce()
      set {miniBossSpawned::room1} to true

on death:
  if {moblist::*} contains uuid of victim:
    add 1 to {_room1count}   
on load:
  delete {bossbar::room1}
  set {miniBossSpawned::room1} to false
  clear {_mobsInRoom1::*}```
#

You forgot an enter

velvet wharf
#

nah that was a issue when i copied it

#

i fixed it at the top

vagrant oriole
#

Oh

#

But the you're setting the name to "Room 1"

#

And so the name of the bar is room 1

velvet wharf
#

yes

#

whats wrong with that?

vagrant oriole
#

Um i meant you're setting the progress to 1 and so the progress is 1

#

I was trynna do 2 things at once...

#

But with you're on load you try to delete a local variable

#

Wich doesn't work

velvet wharf
#

thats to reset it

#

oh wait

#

i can just put that at the bottom

#

after the function

vagrant oriole
#

Thats prob the reason it keeps creating more

velvet wharf
#

its making more because its looping every 5 seconds