#trying to make a skript but no idea how to start

1 messages ยท Page 1 of 1 (latest)

fresh dome
#

Im trying to make item conveyor belts and i have no idea how to start coding it

#

like when i mine that iron a specific item (raw iron in this case) will go down the conveyor belt and stop at emerald

weary sonnet
#

just summon a iron ore and remove that is in there

fresh dome
#

i want to be able to make it 'slide' on the conveyor

dull bay
#

block displays

fresh dome
#

how do i use block displays

fading urchin
#

oh yeah i made smth like that eons ago

#

is it smth like this @fresh dome

dull bay
#

i think this

#

go in docs and search displayentity ull find sumn i think

fresh dome
#

just make it slide 1 direction

fading urchin
#

ion have the code but its smth like this

while {_display} is alive:
     set display teleport duration to 1
     if block below {_display} is shuker box[facing=west]:
          teleport {_display} to {_display}'s location ~ vector(1, 0, 0 )
     if ........ # do for every direction

smth like that should do it

#

idk depends on what you're doing tbh

fresh dome
#

just make a raw iron go down the conveyor belt

dull bay
#

well i mean he bassicaly showed u how to do it

#

thats like all u need..

#

u js gotta spawn the display first and

#

change block below

#

and

#

yea

fresh dome
#

do i set display to my thing?

dull bay
#

skbee i think for the displays

#

unkless skript added them

fresh dome
#

i have skbee and im getting errors

dull bay
#

show code

#

and error

fresh dome
#
    while {_display} is alive:
        set display teleport duration to 1
        if block below {_display} is black terracotta[facing=west]:
        teleport {_display} to {_display}'s location ~ vector(1, 0, 0 )```
dull bay
#

hm

#

set display teleport duration of {_display} to 1

#

and change the block to urs

#

wait the func doesnt make sense tbh

#

also it doesnt need to be a function

#

js make it on mine

fresh dome
#

it would be easier

dull bay
#

it would not

#

no point of using it really

fresh dome
#

ok

#

what do i set display to?

dull bay
#

well u first have to spawn the display eh?

fresh dome
#

yeah

dull bay
#

le spawn block display at event-block

#

and

#

set {_display} to last spawned entity

#

set display block of {_display} to event-block

#

i mean when u make it its not gonna be hard to change it to a func if u rlly would need it

fresh dome
#

sry for delay

#

@dull bay

thin pine
#

display block data

fresh dome
thin pine
#

should be like blockdata of <block>

dull bay
fresh dome
#
    le spawn block display at event-block
    set {_display} to last spawned entity
    set display block data of {_display} to iron_ore
    while {_display} is alive:
        set display teleport duration of {_display} to 1
        if block below {_display} is black concrete:
            teleport {_display} to {_display}'s location ~ vector(1, 0, 0 )``` i did that but then my serverd crashed cause of the while loop
dull bay
#

hm

fresh dome
#

can i make it display item and not display block

dull bay
#

bro do a check first so it doesn't js do it for every iron ore..

dull bay
fresh dome
#

so just change every block with item?

fresh dome
thin pine
#

you don't need to put le infront of spawn anymore

#

was an old workaround to skript not letting you spawn them when they were first added

#

you also don't have to repeatedly set its teleport duration

fresh dome
#

what then

thin pine
fresh dome
#

yeah i did that

#

can i make it smaller?

dull bay
#

1 sec

fresh dome
#

and i need to kill it at the end

dull bay
dull bay
#

should work i tthinkknnnn

#

try it

fresh dome
#

delete the local var?

dull bay
#

i mean its set to the display eh?

#

so yea

fresh dome
#

it doesnt delete it

dull bay
#

hm

#

delete last spawned entity

#

๐Ÿ˜Ž

fresh dome
#
    spawn item display at event-block
    set {_display} to last spawned entity
    set display item of {_display} to raw iron
    while {_display} is alive:
        set display teleport duration of {_display} to 0.3
        if block below {_display} is black concrete:
            teleport {_display} to {_display}'s location ~ vector(1, 0, 0 )
            set display scale of {_display} to vector(1,1,1)
        else if block below {_display} is emerald block:
            delete {_display}```
dull bay
#

hm

fresh dome
dull bay
#

uhh

#

1 sec

fresh dome
#

atleast it works

dull bay
#

event-entity maybeeeee

#

but no

#

since its with the event i think

noble loom
#

Will it work in different directions

dull bay
#

why wouldnt it ๐Ÿ˜ฆ

fresh dome
#

i can make it work i think

noble loom
#

Like without changing the code I mean

fresh dome
#

no

noble loom
#

Because you should keep that in mind

#

In case players can rearrange the conveyers etc. unless they're preplaced in which case it doesn't really matter

fresh dome
#

they cant

#

in this case they cant

noble loom
#

Okay lovely

#

Apologies for pushing irrelevant issues

fresh dome
#

its fine

#

how can i make the teleportation smooth

thin pine
#

teleport duration

#

and waits

dull bay
noble loom
#

Calm it down buddy pal.

fresh dome
#

i also need to take care of killing it

dull bay
#

but the delete is not doing anything right?

fresh dome
#

deleting the var? yeah

dull bay
#

try to see if the check of emerald block even works

fresh dome
#

yeah it works

dull bay
#

hm

fresh dome
#

cant i set the item display to a var

#

nvm

#

how do i kill it

thin pine
#

kill <entity>

fresh dome
#

that doesnt work

thin pine
#

it does in fact work

fresh dome
#

i tried kill item display and kill the item display

thin pine
#

use a variable

#

kill item display is trying to kill an entity type

#

that entity DNE

fresh dome
#

what?

dull bay
#

it cant just recognize a random item display