Warcraft-Source

General Content => Discussions => Topic started by: Osker Lee on January 09, 2019, 11:13:58 AM

Title: Why the Bots can't change their races?
Post by: Osker Lee on January 09, 2019, 11:13:58 AM
Why the Bots can't change their races?They only choose the Undead Scourge,not random races.How to fix it?
Title: Re: Why the Bots can't change their races?
Post by: HOLLIDAY on January 15, 2019, 07:40:17 AM
I made a script for this way back in the day.
Title: Re: Why the Bots can't change their races?
Post by: Osker Lee on January 16, 2019, 05:01:47 AM
Hi HOLLIDAY
Where can i download your script? :)
Title: Re: Why the Bots can't change their races?
Post by: Kiwi :) on January 19, 2019, 12:48:22 PM
If you use eventscripts you can use this script

Code: [Select]
block load
{
es_xset players 0
es_xset counter 0
es_xset player_bot 0
}

event player_death
{
es_xset counter 0
es foreach player players #bot "es_math counter + 1"
if (server_var(players) > 1) do
{
es_isbot player_bot event_var(userid)
if (server_var(player_bot) == 1) do
{
es wcs_change_race event_var(userid) "Bot Race (bot only)"
}
}
}


Works fine for CSS Idk what version you are using

With the script the bots change to the race "Bot Race (bot only)" Thats what my bot race was called


Hope it helps you
Title: Re: Why the Bots can't change their races?
Post by: Osker Lee on January 21, 2019, 05:54:24 AM
[console] es_load: Could not open script for wcs/tools/Bot Race (bot only)/Bot Race (bot only)
Title: Re: Why the Bots can't change their races?
Post by: Kiwi :) on January 21, 2019, 10:27:45 AM
Works fine for me

I called the folder "forcedrace" and the script "es_forcedrace"

You need to put in the race you want the bots to take (in the code)
Title: Re: Why the Bots can't change their races?
Post by: Osker Lee on January 21, 2019, 11:33:48 AM
Works fine for me

I called the folder "forcedrace" and the script "es_forcedrace"

You need to put in the race you want the bots to take (in the code)
For example,just like this ?
es wcs_change_race event_var(userid) "human_alliance"

addons\source-python\plugins\es_emulator\eventscripts\wcs\races  there are 11 races.
Title: Re: Why the Bots can't change their races?
Post by: Kiwi :) on January 21, 2019, 12:24:19 PM
Oh ya im not sure if it works with that version you need to try it :P
Title: Re: Why the Bots can't change their races?
Post by: Osker Lee on January 21, 2019, 01:29:30 PM
My WCS version:
Warcraft Source 0.78 for Counterstrike Source & Global Offensive
http://warcraft-source.com/board/index.php?topic=17185.0