#Teflon Loses its Texture When it Hits The Ground

1 messages · Page 1 of 1 (latest)

hoary ermine
#

If you place a textured block of Teflon, when it falls to the ground the texture reverts to its original texture when in its final resting place.

broken sandal
#

will fix
but i think i'll add a script command to place a falling block, using the same mechanism cave ins do

#
set_falling_block(long x, long y, long z)
add_falling_block(long x, long y, long z, long block_id)
#

the first one acts exactly like a cave in. it will convert the existing block at x,y,z into a falling block (clearing the block at x,y,z in the process)
the second one doesn't clear any blocks, it just creates the falling block (particle) at x,y,z using the block_id specified

manic fern
#

this guy really is the 🐐

hoary ermine
#

Thanks again.

broken sandal
#

I might added a gravity multiplier

hoary ermine
#

As in the block can go upward?

broken sandal
#

As in fall slower

#

or faster

#

but maybe it could go up too, i'd have to check

hoary ermine
#

That would be an interesting mechanic to the game. I could see it being useful. Both the fall speed and if it could go upward.

Also, there is currently a bug with Teflon around the 0,201,0 coordinate and some other floating point coordinates when not in the positive, positive, positive quadrant. Quadrant 4, I believe. I made another separate post about it. I believe it was the cause of the portals being offset and the problem with my block placing script.

broken sandal
#

yep

broken sandal
#

it actually has the ability to specify a velocity vector. i might experiment with that

broken sandal
#
local dir = vec3(get_view_dir())
local pos = vec3(get_eye_pos()) + dir * 2;
local block_id = block.steelplating
local gravity = 0.5
local vel = dir * 40;
add_flying_block(pos.x, pos.y-1, pos.z, block_id, vel.x, vel.y, vel.z, gravity)
manic fern
#

that’s so awesome

hoary ermine
#

This is cool. Is it easy to make it so you can toggle if the block remains after it lands. For example, you would have the option for it to stay how it does not or make it disappear in its final resting place.

The block remaining is preferable, but I could see some uses of it disappearing.

broken sandal
hoary ermine
#

Sounds like we have some cool new things.

broken sandal
#
local gravity = 0.5
local break_chance = 0
local g1, g2 = 0.9, 3
local up = vec3(0,1,0)
local m = 0
local speed = 35
local shot_count = 30
local shot_delay = 50

for i=1,shot_count
do
  local dir = vec3(get_view_dir())
  local pos = vec3(get_eye_pos()) + dir * 2;
  local block_id = block.marker - 20 + get_random(18)
  local vel = dir * speed
  local right = vec3.right(dir, up)
  pos.y = pos.y - 1
  local p = pos
  local v = vel

  m = (i - 1) % 4
  if m == 0 then
    p = pos + up * g1
    v = vel + up  * g2
  elseif m == 1 then
    p = pos + right * g1
    v = vel + right  * g2
  elseif m == 2 then
    p = pos - up * g1
    v = vel - up  * g2
  else
    p = pos - right * g1
    v = vel - right  * g2
  end
  add_flying_block(p.x, p.y, p.z, block_id, v.x, v.y, v.z, gravity, break_chance)
  wait(shot_delay)
end