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
Hey.
I had a idea for blocks that will be great for Roleplay Worlds to make them more compatible.
Please, ignore team text. I don't remember there team blocks already. I'm too lazy to delete the text.
v.1
v.2
I repeat, ignore team text.
How they are working? Because "private" means strange...
Everybody can place them, don't make them owner-only. Only owner of the block (i mean placer but owner sounds more professional) and world owner can see that block and stand on it. It means, if a PLAYER1 place this block, only he and world owner see it active. Other guys, like PLAYER2 just can't do anything with this. When anybody place other block on it, it just deletes, like other blocks.
What do you think? I think it is very good idea for RPG lovers, to make these blocks like invisible for enemies or make it invisible bridge for only one player.
Waiting for opinions, critize max plz.
If you can do anything,
Do it, because after u can't do everything,
Live isn't infinite,
But this isn't too limited!
Offline
No , would require way too mcuh of the gamecode to change i could expliain it in more deatil but im bitz too lazy atm.
Offline
No , would require way too mcuh of the gamecode to change i could expliain it in more deatil but im bitz too lazy atm.
Actually, it wouldn't require too much code changes...
Offline
Actually, it wouldn't require too much code changes...
Yea it would only require the physicks and safe format to change tying every used to every world they have ever placed a block in.
Offline
ProTest wrote:Actually, it wouldn't require too much code changes...
Yea it would only require the physicks and safe format to change tying every used to every world they have ever placed a block in.
mhm... i have no idea what you just said, but never mind...
so... u want blocks that only placer of that block and world owner see?
k, here is example code:
[block placing - server]
if (bid == PRIVATE_BLOCK) {
pl.Send("b", l, x, y, b)
foreach (Player p in Players) {
if (p.Id == pl.Id) continue;
if (p.IsOwner)
p.Send("b", l, x, y, b);
else
p.Send("b", l, x, y, 0); // other players can't see it or stand on it, right? :P
}
// store username of block 'owner'/placer (gonna save that later in database)
BlockData[x,y].Arg6 = pl.Username;
}
[world saving - server]
for (int x = 0; x < WorldWidth; x++) {
for (int y = 0; y < WorldHeight; y++) {
//some other ee code... idc...
if (blocks[x][y].id == PRIVATE_BLOCK) {
DatabaseObject ob = new DatabaseObject();
ob.Set("layer", l);
ob.Set("type", rb);
ob.Set("x", bufferX);
ob.Set("y", bufferY);
ob.Set("placer", blocks[x][y].placer);
//meh
}
}
}
[world init - client]
for (int x = 0; x < WorldWidth; x++) {
for (int y = 0; y < WorldHeight; y++) {
if (blocks[x][y].id == PRIVATE_BLOCK) {
if (blocks[x][y].Arg6 == player.username || player.isowner) {
//idk..? just continue with loop?
}
else {
blocks[x][y].id = 0;
blocks[x][y].Arg6 = "";
}
}
// bla bla .. some other code .. bla bla
}
}
but if u placed private blocks on every single possible coord in 300x300, that would take so much space in database...
ps: maybe i misunderstood OP's post, but meh.. also this is just example code and its late here, so idc if anything is wrong
Offline
Era wrote:ProTest wrote:Actually, it wouldn't require too much code changes...
Yea it would only require the physicks and safe format to change tying every used to every world they have ever placed a block in.
mhm... i have no idea what you just said, but never mind...
so... u want blocks that only placer of that block and world owner see?
k, here is example code:
[block placing - server]if (bid == PRIVATE_BLOCK) { pl.Send("b", l, x, y, b) foreach (Player p in Players) { if (p.Id == pl.Id) continue; if (p.IsOwner) p.Send("b", l, x, y, b); else p.Send("b", l, x, y, 0); // other players can't see it or stand on it, right? :P } // store username of block 'owner'/placer (gonna save that later in database) BlockData[x,y].Arg6 = pl.Username; }
[world saving - server]
for (int x = 0; x < WorldWidth; x++) { for (int y = 0; y < WorldHeight; y++) { //some other ee code... idc... if (blocks[x][y].id == PRIVATE_BLOCK) { DatabaseObject ob = new DatabaseObject(); ob.Set("layer", l); ob.Set("type", rb); ob.Set("x", bufferX); ob.Set("y", bufferY); ob.Set("placer", blocks[x][y].placer); //meh } } }
[world init - client]
for (int x = 0; x < WorldWidth; x++) { for (int y = 0; y < WorldHeight; y++) { if (blocks[x][y].id == PRIVATE_BLOCK) { if (blocks[x][y].Arg6 == player.username || player.isowner) { //idk..? just continue with loop? } else { blocks[x][y].id = 0; blocks[x][y].Arg6 = ""; } } // bla bla .. some other code .. bla bla } }
but if u placed private blocks on every single possible coord in 300x300, that would take so much space in database...
ps: maybe i misunderstood OP's post, but meh.. also this is just example code and its late here, so idc if anything is wrong
I know little in coding. That code looks pretty nice. About 300x300 world, we can just make limit of that blocks in the world, like. max. 50, because we don't need soo much. or 100, idk
If you can do anything,
Do it, because after u can't do everything,
Live isn't infinite,
But this isn't too limited!
Offline
There is a limit on how big the world size (i ment the save file) can be , assuming that on every block postion can only be 2 blocks (bg and fg) it wont be more,
but allowing an infinite number of blocks per x and y position meens that the save limit can be exceeded
edit: also when 2 ppl place thier block(s) on the same position with different colors, whcih one would be shown?
Offline
whcih one would be shown?
Block that was placed last would be shown...
Offline
Pages: 1
[ Started around 1732345361.3175 - Generated in 0.081 seconds, 12 queries executed - Memory usage: 1.52 MiB (Peak: 1.67 MiB) ]