Skip to content

Commit

Permalink
DP | BugFixing #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Feb 28, 2024
1 parent 153f35e commit 0e7a275
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ execute store result storage nnb_spawnsystem:temp id int 1 run scoreboard player
execute store result storage nnb_spawnsystem:temp limit int 1 run scoreboard players get random_r nn_spawn
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__
function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
scoreboard players add ticks nn_spawn 1
execute if score ticks nn_spawn matches 6.. run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
execute if score spawn nn_spawn matches 29 run scoreboard players set spawn nn_spawn 0
scoreboard players add ticks nn_spawn 1
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id)
execute if score ticks nn_spawn matches 11.. run function nnb_spawnsystem:tp_bots with storage nnb_spawnsystem:temp
8 changes: 5 additions & 3 deletions nnb_spawnsystem/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,10 @@ function call_bots() {
data modify storage nnb_spawnsystem:temp bot_name set value "anim8or";
}
// Call the universal spawn bot function
setup_bots() with storage nnb_spawnsystem:temp;
}
scoreboard players add ticks nn_spawn 1;
if (nn_spawn:ticks > 5) {
setup_bots() with storage nnb_spawnsystem:temp;
}}

// Universal spawn bot stuff
function setup_bots() {
Expand All @@ -234,7 +236,7 @@ function setup_bots() {
scoreboard players set spawn nn_spawn 0;
}

scoreboard players add ticks nn_spawn 1;


$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id);

Expand Down

0 comments on commit 0e7a275

Please sign in to comment.