Skip to content

Commit

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

Expand All @@ -241,7 +241,7 @@ function setup_bots() {
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id);

// Delay the teleportation stuff
if (nn_spawn:ticks < -5) {
if (nn_spawn:ticks = 5) {
tp_bots() with storage nnb_spawnsystem:temp;
}}

Expand Down

0 comments on commit 81afb98

Please sign in to comment.