#Toxic Fumes Block

1 messages · Page 1 of 1 (latest)

wanton gyro
#

I want to make blocks that will behave as a toxic gas that slowly spreads in all directions, but not above a certain Y level. I know that using random ticking and place commands will cause IMMENSE lag once it reaches a certain capacity, so i'd like to use as few commands as possible to make this happen, i've never used scripting but i will if it'll help. Obviously this block will also damage the player if their head is inside the block, but i dont want to use commands for that because of the lag it'll cause once theres enough of this block.

fickle sand
#

For the damage couldn’t you just execute from the player to test if they’re in the block and then do damage? You would have to use tick.json for that though

wanton gyro
#

Oh you're right, that could help

#

Running the command from tick.json instead of from every block

turbid hull
#

There are not many ways to stop this from causing a lot of lag

#

unless you limit how far the gas can travel from the player

vast quiver
#

Okay here is an idea, based on what I had to do to limit my vein miner from taking down a whole mountain stone (lag city):

First off, gas would have to emit from a tiny invisible entity, that dies after a certain time. It's only job is:

  1. place a copy if itself in the surrounding air blocks that do not already have an entity,

  2. emit gas particles or whatever effect look you have in mind

  3. die

Now how I limited this from being forever, is to start with entity_15 or less, which places entity_14...and on down to entity_0 who places no one.

Like I said, this is a variation of my vein miner idea that I had to limit this way. I immediately thought of this for your problem because it has a wide spread effect that you can limit.

turbid hull
#

Block properties can also be used to limit the amount of blocks placed instead of spawning entities that add more lag

minor turtle
#

Extending what prov is saying, you can just have it set a block to air and then have the block set (one of) its block property(s) to a different value that makes it stop spreading