#How do I make a piston go until it reaches a surface

1 messages · Page 1 of 1 (latest)

junior spindle
#

I need to make a piston keep going until it reaches a surface, once it stops it needs to send a signal

cobalt cove
#

You could get the position of the piston and add a sphere cast to it. Add an event 30hz and a if so when hit on sphere cast is true it will stop and connect stop to an event sender.

dense cradle
#

Use a raycast

Get the pistons forward vector and position and wire it into a raycast

#

The raycast will output the distance from the piston to the object that it hit

#

Wire that into the distance input on your piston

dense cradle
#

Raycast
Get forward vector
Get position

#

Look at the pistons circuit board

#

There’s a yellow output at the very top

#

wire it to the Get chips

#

@junior spindle

junior spindle
dense cradle
junior spindle
dense cradle
junior spindle
#

Ok doing it rn

#

No worky

paper ravine
# junior spindle This isn’t working

One Don't hook up the distances and two u want the raycast distance to be smaller so that it's directly infront of the piston and number three u need an if chip that's hooked up to the hit part of raycast then hook the then up to the stop on piston and configure raycast to ignore players 🙂also just curious what's this for?

junior spindle
#

But I have no idea what you’re trying to say here

paper ravine
#

If I'm wrong it's probably cuz I'm half decent at circuits in my opinion

paper ravine
paper ravine
#

It's instructions

junior spindle
#

Also it’s for a hook thing that shoots out and grabs players

paper ravine
#

Oh

#

I can make u one

#

Also u wouldn't have to do that

#

That's just extremely confusing

junior spindle
paper ravine
#

I can help u

#

I can try to explain or show pictures

junior spindle
paper ravine
#

Mk

junior spindle
#

My plan is to attach a trigger volume and a seat to a piston that just goes until it hits something or until about 5 seconds is up

junior spindle
paper ravine
#

I want to explain without confusing u but can't

#

Ehhh

junior spindle
#

I’ll mess with this ray cast thing until it works

paper ravine
#

So after the trigger hits something or both after a delay of five seconds piston comes

#

Baco

paper ravine
#

No need

paper ravine
#

Yuh

#

Hmmm

#

U could get a trigger handle and when trigger handle primary action pressed piston fires forward and it has a trigger volume with seat in front hooked to gold bit and when the trigger volume touches a player it's seats that player and when it touches a object it stops and after a delay of 5 seconds after delay brings piston back

#

And wire piston to gold bit on a clamp and the trigger to black part

#

Then it should work ish

#

🙂

junior spindle
#

Idk why I didn’t think of that

paper ravine
#

?

#

Ooohhh

junior spindle
#

I didn’t think to use the trigger volume to stop the piston

paper ravine
#

Cuz u smarter n there's probably a better way

junior spindle
#

Tysm

paper ravine
#

Np ig??

#

Yw

keen furnace
#

Collision detection volume on Object hit stop piston🤷‍♂️

paper ravine
#

But the collision volume does the same as trigger in this case

keen furnace
paper ravine
#

They could just switch them out still same instructions

distant thorn
paper ravine
#

Ehhhhh

distant thorn
#

From my use of the collision detection volume it’s more janky than a trigger volume

keen furnace
distant thorn
#

Yeah I get that but since collision detection volumes use multiple collisions inside of it, it’ll go off more than once

keen furnace
#

Ahhh. Then filter it with an int variable that adds with each hit. If less or equal to 1 execute, Else do nothing

distant thorn
#

Then when the trigger handle is pressed again reset the variable and push piston

keen furnace
#

Yup

distant thorn
#

That would definitely work, I just had to butt in because of how they act when hitting a player, it executes every single time the player hits a collision causing the impulse on said player to like die😭

keen furnace
distant thorn
#

I agree and be able to set how long the collisions are so we can use a single collision and make it long enough to match the blade of a sword if needed

paper ravine
#

.....

#

Y so complicated

#

Just use a trigger then

junior spindle
#

How tf do you even find this

tawny summit
paper ravine
potent yoke
tawny summit
junior spindle
tawny summit
blissful zenith
#

Is this already answered

#

I mean I would have just got a trigger volume on the piston and attached it to the piston and when the object entered I would stop the piston

tawny summit