01-03-2014, 01:16
(This post was last modified: 01-03-2014, 01:18 by Nekochan.)
What if get bots as ServerClients and "notify" them to change the team?
Like a gsc:
Code: self notify("menuresponse", game["menu_team"], "allies");
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Error 4 The name 'ScriptFailuireByteCheckAddress' does not exist in the current context ???
01-03-2014, 01:35
(This post was last modified: 01-03-2014, 01:48 by master131.)
(01-03-2014, 01:28)hillbilly Wrote: Error 4 The name 'ScriptFailuireByteCheckAddress' does not exist in the current context ???
Sorry, I deleted a line by accident, check the main post again.
Also, got the bots to spawn properly, I've updated the example and added TestClients.cs to the main post.
A casual conversation between barata and I about Nukem.
TestClients.AddTestClient
sorry noob attack here ??? how do ya get em to spawn?
(01-03-2014, 02:10)hillbilly Wrote: TestClients.AddTestClient
sorry noob attack here ??? how do ya get em to spawn?
Check the example...
A casual conversation between barata and I about Nukem.
01-03-2014, 02:25
(This post was last modified: 01-03-2014, 02:26 by hillbilly.)
i'm still getting error with the Timing.cs
Error 20 Using the generic type 'System.Action<T>' requires 1 type arguments
public static void OnNotify(string type, Action<Parameter, Parameter, Parameter, Parameter, Parameter, Parameter> action)
{
OnNotify(type, action, false, -1);
}
01-03-2014, 02:29
(This post was last modified: 01-03-2014, 02:30 by master131.)
(01-03-2014, 02:25)hillbilly Wrote: i'm still getting error with the Timing.cs
Error 20 Using the generic type 'System.Action<T>' requires 1 type arguments
public static void OnNotify(string type, Action<Parameter, Parameter, Parameter, Parameter, Parameter, Parameter> action)
{
OnNotify(type, action, false, -1);
}
Uncomment the code at the top, seems like .NET 3.5 is missing some of the overloads of Action<T>.
A casual conversation between barata and I about Nukem.
Thanks now i can have bots walk in a circle and make people wonder.
01-03-2014, 03:26
(This post was last modified: 01-03-2014, 03:37 by hillbilly.)
ok got it working ty, any way to change the bots name, and while this is a massive step forward, the bots are somewhat docile.
also on map change they get stuck in spec still.
01-03-2014, 07:51
(This post was last modified: 01-03-2014, 08:05 by master131.)
(01-03-2014, 03:26)hillbilly Wrote: ok got it working ty, any way to change the bots name, and while this is a massive step forward, the bots are somewhat docile.
also on map change they get stuck in spec still.
Not sure about map change, they seem to be stuck in a connected state. Probably need to kick the bots and respawn them. As for changing bot name, not sure, you may way to tinker with the connectString, not sure if the game will recognise the player as a bot though.
Code: public override void OnMapChange()
{
_spawnedBots = false;
foreach (var client in GetClients())
if (client.Name.StartsWith("bot"))
ServerCommand("kickclient " + client.ClientNum);
}
Code: var connectString = string.Format(
"connect {0} \"\\cg_predictItems\\1\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\bot{0}\\protocol\\{1}\\checksum\\{2}\\statver\\{3} {4}\\qport\\{5}\"",
"Poop", protocol, GetChecksum(),
GetStatMajor(), (uint) GetStatMinor(),
BotPort + 1);
A casual conversation between barata and I about Nukem.
|