Skip to content

Commit

Permalink
DP | Add spawn effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Feb 28, 2024
1 parent 973931a commit 48b9277
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
function nnb_spawnsystem:root with storage nnb_spawnsystem:temp
function nnb_spawnsystem:map_detect
execute if score started nn_lobby matches 1 run function nnb_spawnsystem:timer_msec
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ execute store result storage nnb_spawnsystem:temp limit int 1 run scoreboard pla
execute store result storage nnb_spawnsystem:__storage__ switch_key int 1 run scoreboard players get spawn nn_spawn
function nnb_spawnsystem:__private__/switch_case/1/select with storage nnb_spawnsystem:__storage__
scoreboard players remove ticks nn_spawn 1
execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
function nnb_spawnsystem:root with storage nnb_spawnsystem:temp
32 changes: 17 additions & 15 deletions nnb_spawnsystem/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Text.tellraw(@a, "Spawn System Loaded");

// Run Every Tick
function __tick__() {
root() with storage nnb_spawnsystem:temp;
map_detect();


Expand All @@ -13,20 +12,7 @@ timer_msec();



// Bossbar & Entity Stuff
function root() {

//Detect if round has started
if (nn_lobby:phase = 5) {
// check if minutes are not less than 0
if (nn_lobby:min >= nn_lobby:0) {
// Set the bossbar stuff
$bossbar set minecraft:game name [
{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},
{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},
{"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}];

}}}



Expand Down Expand Up @@ -227,7 +213,10 @@ function call_bots() {
scoreboard players remove ticks nn_spawn 1;
if (nn_spawn:ticks < 10) {
setup_bots() with storage nnb_spawnsystem:temp;
}}
}
// Tick the bossbar with the correct info
root() with storage nnb_spawnsystem:temp;
}

// Universal spawn bot stuff
function setup_bots() {
Expand Down Expand Up @@ -260,7 +249,20 @@ function tp_bots() {



// Bossbar & Entity Stuff
function root() {

//Detect if round has started
if (nn_lobby:phase = 5) {
// check if minutes are not less than 0
if (nn_lobby:min >= nn_lobby:0) {
// Set the bossbar stuff
$bossbar set minecraft:game name [
{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},
{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},
{"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}];

}}}



Expand Down

0 comments on commit 48b9277

Please sign in to comment.