#Moving platform

1 messages · Page 1 of 1 (latest)

twilit flint
#

just use structures

shrewd shoal
#

my face when I made an entire function for this 😔

#

uh no

#

I did not read that part

#

if whatever:
paste structure one block up

#

else:
paste structure one block down

#

yes

#

I don't know, and I'm not going to google it for you

#

I just know that it's possible

#

could try it

#

I don't know either

#

found it

shrewd shoal
#

by testing it out...?

#

see what it gives you (returns) then mess around with that to get the block you want

hard jungle
#

instead of using skript just use command blocks for this

#

skript complicates it

lucid hatch
#

i'll try something in a few hours

lucid hatch
#

alright i managed to make a skript that moves a platform up and then down, on the hit of an arrow.
you can just take out what you need from it, and probably edit some of the coordinates to your liking.

on projectile hit:
    if projectile is an arrow:
        wait 1.5 seconds
        kill event-projectile
        if event-block is lit redstone lamp:
            set {_pos1} to block at location(123,70,339,event-world,0,0)
            set {_pos2} to block at location(125,71,341,event-world,0,0)
            set {_s} to structure named "Platform"
            fill structure {_s} between {_pos1} and {_pos2}
            loop 10 times:
                loop all blocks within {_pos1} and {_pos2}:
                    set block at location of loop-block to air
                add 1 to y-coordinate of {_pos1}
                add 1 to y-coordinate of {_pos2}
                place structure {_s} at {_pos1}
                wait 1 second
            loop 10 times:
                loop all blocks within {_pos1} and {_pos2}:
                    set block at location of loop-block to air
                remove 1 from y-coordinate of {_pos1}
                remove 1 from y-coordinate of {_pos2}
                place structure {_s} at {_pos1}
                wait 1 second

i'm sure there are plenty of ways to improve this, but it does work.

#

i think the thing you were doing wrong was that you were trying to take coordinates from a structure, which does not actually hold any locations, also that you were doing some weird unnecessary stuff with... stuff.

lucid hatch
#

worked perfectly for me though

#

any errors?

#

you never make the platform structure

#

like you need to do set {_platform} to structure named "platform"

#

before filling it

#

@chilly heath (just pinging ylu so you see)

#

yes, but you have not made the variable ready to be filled, you first need to set it as a structure so it understands

#

wont be able to respond for a few hours, hope it works

lucid hatch