Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Hello everyone,
So It's become clear that I'll need to two users to draw any large maps in worlds because of them being disconnected after X amount of blocks. However, I am unclear how to do this.
1) How do you add more than one user to a level with a bot? I've never made a bot that added more than one user, so I have no clue.
2) How do you control which of the users in the level draws a tile? Do they generate a different world key?
3) How do you control which user receives data from the non-bot users in the level?
These three questions are what are keeping me back from my progress on my bots. Any help would be appreciated.
Offline
What size because I want to help you
Offline
Add bots to a list and then call
bot[i].Send(data);
(i < bot.count - 1) ? i++ : i = 0;
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
With bots, Koya means connections.
Each connection represents a bot connected.
I could hand you a little bot of which I know which works (for me), if it doesn't for you then it might also be a smart idea to ask a moderator why.
What you can also do, is that whenever a bot gets disconnected (in case it's unresolvable), listen to it being disconnected and start it back up.
Offline
1) How do you add more than one user to a level with a bot? I've never made a bot that added more than one user, so I have no clue.
Make 2 connections, the same way you would do one for one user, you can even attach both of them to the same OnMessage
2) How do you control which of the users in the level draws a tile? Do they generate a different world key?
# b - UserID added bricks, decorations, backgrounds (Blocks)
[0] <Integer> Layer (BackGround = 1, ForeGround = 0)
[1] <Integer> PosX
[2] <Integer> PosY
[3] <Integer> BlockID
[4] <Integer> UserID
The UserID tells you who placed a block, the UserID <-> UserName matches can be made using the "add" message:
# Add - UserID joined the room
[0] <Integer> ID
[1] <String> UserName
[2] <String> UserID
And many other messages(snipped out)
3) How do you control which user receives data from the non-bot users in the level?
I'm not sure about this one, so I'll just let someone else provide a better answer. Otherwise, most messages are sent to all users, with some exceptions I won't list here
Offline
I'm having trouble having both bots place blocks. Only one seems to be able to, despite using two different "connection.Send"s. Do I need to make two different world keys?
Offline
I'm having trouble having both bots place blocks. Only one seems to be able to, despite using two different "connection.Send"s. Do I need to make two different world keys?
Yes you need different worldkeys. Two connections.
Offline
Just... Copy all your code, paste it in a new file, rename your "Program" class to "Program2", your "void Main" to "void Main2" and in your program add this:
static void Main() {
Program2.Main2();
// Do stuff you normally do here
}
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
capasha.com wrote:# b - UserID added bricks, decorations, backgrounds (Blocks)
[0] <Integer> Layer (BackGround = 1, ForeGround = 0)
[1] <Integer> PosX
[2] <Integer> PosY
[3] <Integer> BlockID
[4] <Integer> UserID
Actually the last one is tickId, used for the campaign levels, can fill in any integer there.
Offline
Jonathan1003 wrote:capasha.com wrote:# b - UserID added bricks, decorations, backgrounds (Blocks)
[0] <Integer> Layer (BackGround = 1, ForeGround = 0)
[1] <Integer> PosX
[2] <Integer> PosY
[3] <Integer> BlockID
[4] <Integer> UserIDActually the last one is tickId, used for the campaign levels, can fill in any integer there.
Is there really a tickid for blocks?
Offline
No, it is the userid. You are mistaking "b" for "m".
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
2users1bot.com :v
( ͡° ͜ʖ ͡°)
Offline
Pages: 1
[ Started around 1733364898.4686 - Generated in 0.100 seconds, 12 queries executed - Memory usage: 1.53 MiB (Peak: 1.69 MiB) ]