#Is there any way to remove {var..%loop-player's uuid%*} from a block?

1 messages · Page 1 of 1 (latest)

hybrid burrow
#

what do you mean remove a var from a block

round wraith
#

When i place a block a add location of event-block to {placedblocks::%player's uuid%::*} this will happend

#

after that someone will eventually break my block to place their block

#

after that when i die my all of the location when i placed my block will be removed

#

how do i stop that?

hybrid burrow
#

remove the part that deletes it after you die... did you code this?

round wraith
#

wdym

hybrid burrow
#
  set blocks at {placedblocks::%victim's UUID%::*} to air
  delete {placedblocks::%victim's UUID%::*}``` this part of the code deletes the var
#

do you want that or not

round wraith
#

yes

#

?

hybrid burrow
#

i dont get what youre looking for

round wraith
#

Its like

#

when i placed a block

#

after that if i die

#

the block gets remove

#

its perfect atm

#

but theres an issue

#

when i place a block

#

the other player will see it

#

then theyll destroy it

#

But when they destroy it

#

my var is still there

#

which causing them to lose their block after i die

#

I just want to prevent that my adding this?

  loop all players:
    if location of event-block contains {placedblocks::%loop-player's UUID%::*}:
      remove {placedblocks::%loop-player's uuid%::*} from event-location```
#

But ive never done it before so i dont really have much experience in it

hybrid burrow
#

again, why are you removing a var from a location

#

other way around

round wraith
#

So when other player place their blocks

#

it wont get destroy when i die

hybrid burrow
#

i get why youre removing an event-location from a var....

But youre not doing that, youre removing a var from event-location

#

other way around.......

round wraith
#
  loop all players:
    if location of event-block contains {placedblocks::%loop-player's UUID%::*}:
      remove event-location from {placedblocks::%loop-player's uuid%::*}```
#

?

#

?!?!?!

hybrid burrow
round wraith
#

damn im sorry i havent try lemme try xd

#

it

#

doesnt

#

work

#

damn

#

Sorry for not messaging in 1 sentense

real forum
#

You still did not fix your issue?

round wraith
#

yes im trying to figure it out :(

real forum
#

Btw there will be always bugs, if players use pistons and move the blocks

#

Just saying

round wraith
#

ive disabled crafting xd

#

Thank you for the advise

real forum
#

I think i'll remake it a little

hybrid burrow
real forum
#

Yes, you can. But i act like Rapiii doesn't want to

#

cancel pistons

#
on place:
    set {placedBlocks::blocks::%location of block%} to player's uuid
    add (location of block) to {placedBlocks::players::%player's uuid%:*}

on death of player:
    set (blocks at {placedBlocks::players::%victim's uuid%::*}) to air
    remove (victim's uuid) from {placedBlocks::blocks::*}
    delete {placedBlocks::players::%victim's uuid%}

on break:
    delete {placedBlocks::blocks::%location of block%}
    remove (location of block) from {placedBlocks::players::%player's uuid%::*}

Not sure now. It'll require some testing

round wraith
#

Love it! Thanks for your help :D I really appreciate it.

real forum
#

Also, you might have issue with sand

#

When player places it in air and it falls

#

Sand and gravel and anyy other falling blocks like anvil

round wraith
#

Error occured :(

real forum
#

Yeah. Missing one semicolon

#

Or whatever it is named

round wraith
#

ah okay

real forum
#

colon

#

add (location of block) to {placedBlocks::players::%player's uuid%::*}

round wraith
#

Thank you

real forum
#

Test it and see

round wraith
#

well

#

it deletes 1 block

#

but other is fine

#

Thank you ill use it

real forum
#

Np

round wraith
#

I appreciate your help alot

#

have a great day :D