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
This is kinda stupid but how do you check if a player is near a block? I wanna make a digbot.
All that a digbot does is check if a player is near a block. So how do you do that? Save a "b"? What if the block was placed before the bot came in?
Offline
In the init message you receive WorldData, which contains all the blocks that are pressent when the bot joins the room.
Problem is that the worlddate is serialized and you don't just get all the data the easy way: you'll have to deserialize it.
here you can find an example of a worlddata deserializer with explenation on how to use it.
Offline
In addition to what den said about worlddata,
you have to update the worlddata whenever a block is placed.
Afterwards, make a player class and make it update whenever a player moves so you can check if they move near a block.
Offline
Pages: 1
[ Started around 1732476144.0198 - Generated in 0.031 seconds, 12 queries executed - Memory usage: 1.38 MiB (Peak: 1.49 MiB) ]