From 28a797bba9e9859d94a1c80a39973b9edf25f750 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Sun, 5 Dec 2021 17:57:47 -0800 Subject: [PATCH] Grief: add code for spawning bots --- scripts/zm/_zm_reimagined_grief.gsc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/zm/_zm_reimagined_grief.gsc b/scripts/zm/_zm_reimagined_grief.gsc index 11463fce..1b057df4 100644 --- a/scripts/zm/_zm_reimagined_grief.gsc +++ b/scripts/zm/_zm_reimagined_grief.gsc @@ -26,6 +26,7 @@ init() level thread set_grief_vars(); level thread init_round_start_wait(5); level thread unlimited_zombies(); + //level thread spawn_bots(7); } on_player_connect() @@ -559,4 +560,16 @@ unlimited_zombies() wait 1; } +} + +spawn_bots(num) +{ + level waittill( "connected", player ); + + for(i = 0; i < num; i++) + { + bot = addtestclient(); + + wait 0.5; // need wait or bots don't spawn at correct origin + } } \ No newline at end of file