#text display interpolation

1 messages · Page 1 of 1 (latest)

karmic sequoia
#
function littleDisplayThingy(l: location, n: text, d: integer):
    add random integer from -1 to 1 to x-coordinate of {_l}
    add random integer from 0 to 2 to y-coordinate of {_l}
    add random integer from -1 to 1 to z-coordinate of {_l}
    spawn text display at {_l}
    set {_t} to last spawned entity
    set display billboard of {_t} to center
    set display text of {_t} to {_n}
    set display text opacity of {_t} to 255
    set display interpolation duration of {_display} to 1
    set display translation of {_t} to vector(0, 1, 0)
    set display interpolation start of {_t} to -1
    wait 2 ticks
    set display interpolation duration of {_t} to 20
    set display text opacity of {_t} to 100
    set display text background color of {_display} to bukkitColor(26,0,0,0)
    set display interpolation start of {_t} to -1
    wait 5 seconds
    kill {_t}
    delete {_t}```
i don't really know how display interpolation works, i am trying to make this function summon a text display that will be interpolated to move up by 1 block and have a lesser opacity, but instead it fades in for some reason and doesn't move up
valid plinth
#

@karmic sequoia Try putting a delay between creation and interpulation.

#

1: Create an edit properties
2: wait 5 ticks (safe duration)
3: set interpolation start, etc, etc

#

Wait you already did that.

#

Sorry-

karmic sequoia
#

ye it's all good

#

i just increased the wait to 5 ticks and it seems the minimum opacity i can get before fading is 127, but that's still only half the opacity i want

karmic sequoia
#

i think this is an issue with either my client or the server's software, i tried sovde's chat thing in #showcase and it fades incorrectly for me

#

gonna do some testing

#

this is not a version issue

stray yarrow
#

ok

round knot
#

something useful to know is that you don’t actually need the wait 5 ticks thing
if you spawn an entity and use a block statement to change its interpolation duration, it will apply immediately without the need of waiting
a block statement goes something like this:

  set interpolation of entity here

Shane showed me this (by accident) earlier and it’s been useful for me ever since