G'day and welcome to another space engineers tutorial and today we're going
to be taking a look at elevators specifically elevators that you can
design entirely in vanilla. The design that I'm going to show you today is one
that can go to multiple floors, is built with just pistons and has sensors to
allow it to have music, dings when it arrives at floors, using
timers to get it to go to multiple floors and we'll go through each step
along the way in order for you to be able to build something like this
yourself. I'll also show you a few of the things that I feel can be pitfalls in
vanilla designed elevators. So let's hop off this ferris wheel, there we go
and let's have a look at this elevator. The one on the left is the one I've
already built to show you what we're going to be constructing and the one on
the right is where we're going to build our own so if we run around here
and enter via our stairs. We can have a look we've got our elevator car, it has
almost no gap between it and the floor here which is something we'll get
into shortly. We can hop on board and then the music will start playing, if we
go all the way up to the top - let's go to the third floor, ding as we pass the second and
we should hear a ding - it'll be a bit early - actually the top one is
the one that works right excellent and the doors automatically open and close
for me. If I now run down these stairs and head towards the middle floor we can
call the elevator to that floor and it will come exactly where we want it.
And down it comes nice and smoothly.
And... Ding! It's about to arrive and there we go as we walk up doors open music
starts again. This is something we can do entirely with vanilla blocks and without
a single bit of scripting which is right up my alley
Yeah the dings sometimes are a bit early but that's more a limitation of how I
laid out all of these blocks around here you could certainly get a more accurate
ding like you get up at the top floor if you set it up in a slightly different way.
When you're building an elevator car you've got a couple of options in
how you approach it you can either have the pistons
push up from below or if you've got a space above you can actually dangle the
car from the pistons and have them lower the car down, either way works and
they'll both work with this design. In this case though I've gone with a push
the car up design and what we're first going to do is build a horizontal piston
which doesn't make a lot of sense until you look at blast door edges and the
reason we're looking at blast door edges is we need a way for the car to slip up
and down pretty close to these blocks and usually the way I would design
something that needs to visually look like it's touching but the game engine
doesn't count it as touching because the collision meshes don't actually
interact, I would use a blast or edge. But in the case of an elevator this is
somewhere where I really don't like to use it and that's because if you walk on
with blast doors you get this little drop, this little bump and you cannot get
it neat. If you put the blast door edges on your elevator you're still stuck with
it because the edges cannot sit on top of your piston part you will have to put
an armor block on there and then you're left with the same thing because what
you'll usually do is surround it with blast door pieces and you'll still end up
with this funny, little, raised part on just one block. There are mods that
will allow you to have a blast door block to replace that, that has an attachment
on one surface but we're trying to do this in vanilla so there's another way
of doing it and I think it actually looks better than using blasts door blocks
at all. And that is where we use a horizontal piston to start our design.
You want this piston to be attached to the wall where you're going to be
entering the elevator from, so what we're going to do is with a gap all around it
we're going to place a piston in here. On that we will place a light armor block
and in a moment I will show you how this creates the extra space, but basically
this piston has pushed this block just the tiniest fraction to my right and
that will allow anything that's attached to it - if we go like this, these would be
able to slide up and down against each other with visually almost no gap (if I
line up you can just barely see it) but it's not a gap that the character can
fall through or even be aware of as you walk across it so I think it works
really, really nicely. Now, I've got a bit of space here so I'm gonna leave this
armor block but what you can do if you're really tight for space is you
could put your first vertical piston against your horizontal
one but I'm gonna place this on here and now we've run into the second problem
with piston elevators. If we have a look at our piston, we can
right click on its control panel, we can then scroll down to here and we'll see
velocity, currently it's at -0.5m/s if we hit reverse this
will make it extend at 0.5 meters per second
and this is one of the limitations of pistons: they can only extend 10 meters
and each large block in space engineer's is 2.5 meters, so this is only going to
get us four blocks up. Yeah, that'll work for this floor to this floor, but what
about getting all the way up here? We'd have to stack
multiple pistons on top of each other to get that high and if we pop this one
on here and extend it (right click in there, reverse) and we can even extend
this at of faster rate. If we ctrl+ click on that and click 2 that's gonna
go up really quickly. There you go 2 stacked on top of each other and we can
just reach this elevated level up here, but let's show a problem when we reverse
these both down with two pistons stacked
on each other. You actually end up running into a problem where they start
taking up a lot of vertical space and I prefer to avoid having a huge stack of
pistons all in a line if I don't need them and for helping us be able to reach
each of these floors independently I'm actually going to get three Pistons into
this space. But you can see I'm not going to be able to put them on top of each other,
because if I want our elevator car to be at this lower level those two Pistons on
top of each other... that does not work. So we'll get rid of that one. What we do is
here is where we use our blast doors. So if we put a corner on there, then a
corner on here, then we can use an edge along here, and here we take advantage of
the smaller collision boxes that blast door blocks have and that they don't
extend out to the full two and a half meter cube. On multiple sides you can see
here that where the red box is is the full collision limit and the blast door
blocks don't quite reach that. Even though visually this edge does, the
collision box is actually about ten or fifteen centimeters inside that. So that
means we can place a piston right here and it'll be able to function normally.
Then we can go again with our blast door corner here, corner here,
and edge here and here. Now, I've done this in a deliberately bad way because I
want to demonstrate something. If we place a piston on this block now the
part will not be placed and it'll say wheel cannot be placed (but that's the
piston part) and unfortunately this particular arrangement doesn't work.
There are many tight patterns that you can use but this one, where we've gone
back one way and then we've come towards us, then right and towards us, then left
will not work so you'll need to come up with other patterns if you've run into
this problem. Fortunately we only need three of these so what we can do is
place an edge there and then another piston right there and we're all done.
That will be enough pistons for us to reach all the way to the top.
I could take two approaches here, I could build a block here and then a block here,
and then I would be just a bit too high but it would allow me to have the car
here, if I place a block there and there. I'm pretty sure the character can almost
walk across that, let's see... yeah, sort of, it's a bit bit janky.
So instead of that, what we're going to do is, we're going to place just a single block
we'll put a slope in there, block there and a slope there and now we're going to
extend this up till it matches perfectly with this floor. And I'm going to
estimate that's going to need to be about two meters and I think it's going to
be 2m because the full space engineers large grid cube is two and a
half and I reckon that's about four fifths. So what we'll do is we'll
right-click on our control panel for our piston and we're going to set our
minimum distance, we'll control click on that and we'll set it to two. We'll then
hit reverse to get this to extend. Once it's beyond two meters we'll then hit
reverse again and it'll come down and it'll stop at that point. So let's have a
look at where that's lined up... turns out I was pretty much spot-on and
I'd love to say that I'd done that on purpose but that was all actually
guessing in the moment. It's been a while since I built most of that elevator over
there and I did not remember the numbers :P So let's build the back half of it now
that we can because it's not going to intersect with these blasts door blocks.
You can see here, visually those are actually right inside each other but
according to the physics engine they aren't because the collision mesh of
that blast door block is lower than that point. So we've now got our
lower set point for our first floor. Let's figure out how high we need to go
to get to this one. It's going to be an extra one... two... three blocks, so that's
seven and a half meters. We need to set this piston to a maximum distance of
nine point five meters, it's the seven and a half plus the two, so let's set
this to nine point five and then we'll hit reverse we'll get it to extend all
the way up there and we'll see hopefully that this will then allow us a very
smooth walk straight on to those interior wall blocks over there.
Look at that! Perfect! And you can see this tiny gap, this is why I like having the
horizontal piston as your first part of your construction, this is just heaven.
Now we've got a piston set with its maximum and minimums, to get to this
middle floor, let's set up these last two to get us up to the final floor. We're
going to need to go at least one full piston, so let's extend this one all the
way out and let's make it happen a bit quicker, velocity 1
Let's see how close we get and see what we need out of the final piston. Oh we're
pretty close, so we've got one more block. So we need to go 2.5 meters with that
last piston, let's grab it and we will set its maximum distance: ctrl-click 2.5
enter, reverse it and it will take us that last little bit and then we'll be
neatly lined up with these catwalk blocks. Oh yeah! That is nice. Now we've
got Pistons set up for each floor let's put a button panel onto our elevator and
let's build three timer blocks over here: 1... 2... 3. To help us set up the timer blocks
more easily we're going to name each of these pistons. This piston down here, it's
the one that helps us just get that last little bit to get to the top floor, so it
takes us between the first and second floors (that's not how you spell second)
and then we'll go up to this piston it also does that, so we're going
to call it first and second as well. We don't need to know which one of these is
which, it doesn't actually matter for our purposes so I'm going to name them the
same thing. And then finally this piston does something different altogether,
it goes between ground and first that's going to be very helpful in a second, as
we jump into our control panel over here and we grab our first timer block.
Our first timer block is going to be named ground, it's going to take us to
the ground floor. So what it needs to do is tell piston first and second to
retract, the second one to retract as well, and piston ground to retract. So we
want all of the pistons at their minimum distance to get us to the ground floor.
and that will be timer block G, That's all it needs to do.
Timer block 2 is going to be renamed timer block first and we can set up its
actions to set piston first and second to retract, first and second to retract,
and then piston ground to first to extend. And that will stop us at the first floor.
Then finally we can set up the second floor in the same sort of way, set up
actions, extend, extend, and extend. And that's it! Now with this button panel we
can grab our timer timer block, ground will be our first one, so it'll be
triggered now, and then first, trigger now, and second, trigger now. Now if we press
these buttons we should be taken to the correct floor. Let's test this out, let's
go to the middle floor. Down we go, and we should stop nice and neatly at the
second floor... perfect! Well almost perfect, there was a bit of wobble there and with
this elevator design what you can do is just quickly grab all of your pistons
and share the inertia tensor on them. This will stiffen up the elevator, now
you can run into a problem with this if you have a lot of pistons stacked on one
another: you may need to increase the force available to them to push
something like this out of the way. Because of the way share inertia tensor
works the pistons closest to your main grid will in effect be lifting more mass,
once you turn this on. So they're going to need more force to do it and the way
they can get that increased force is by increasing your maximum impulse axis.
It's very quickly taken in to red zone here but it's still relatively safe, the
main impact in terms of a negative of having a high impulse axis
is that at higher levels this piston will push straight through solid blocks
and destroy itself and anything in its path trying to do that. Which is a danger
but if you set everything up correctly it shouldn't be too much of a problem
and it should be relatively safe to do though maybe not super safe on a
multiplayer game, safe enough a single-player though. You can also get
some benefit in turning share inertia tensor off for the first piston (the
horizontal one) because then you're not sharing mass between the whole base and
the elevator mechanism. You'll see if I go down down to the ground floor
everything's silky, silky smooth. There's no wobble,
there's no buffeting about, which is probably good since, I've only got about
four or five centimeters between the two blocks. We don't want it bouncing around
too much. And now we've got buttons that can take us to every floor if we want a
call button on each floor we can just set it up pretty easily. Pop a button
panel in, hop in here and we're on the ground floor so we'll have a trigger now.
Do the same for the middle floor and the same for the upper floor as well.
With button panels on all floors we can call the elevator to us if I click this
here it'll come all the way up to me perfectly where I want it and there's
your call button for your elevator you could put buttons in for every other
floor but I don't see like that feel like that makes a lot of sense we would
just want one button unfortunately the button panels always
have four buttons but you know we can live with that so now we've got button
panels to call us to each floor let's put a little bit of style into the
elevator and let's put a door in as well there we go
we have our elevator car all exactly as we wanted it but would it be nice if the
door was automated if it worked just on its own there are two approaches you
could use to set up a sensor to open and close this door as you arrived
or you could either have a sensor on the elevator itself that detects people and
I would suggest using it as a detect the character not detecting anything else
and I'll demonstrate that short why I would suggest that shortly so let's go
differently to what I've done over here over here what I've got is a sensor at
each floor as I move into this sensor you can hear that the door is opening
and closing so instead of having three sensors one for each floor let's put one
sensor on the elevator that opens and closes the door what we need is a sense
of field where as we approach the door we enter it and as we get through the
door we leave it so that as we're through the door it automatically closes
behind us and probably the easiest place to put that sensor is actually gonna be
underneath here we'll place a sensor here under the door to help us with
demonstrating where this sensors ranges let's show sensors field range in our
info section of the terminal and then we'll right-click on the face of it and
we can set up its range now my way of always remembering which way around a
sensor is is thinking of it like it's a cyclops with a sort of a per face on
so you can see the eye is the blue part and the green part is the mouth and that
means that this is up and if you think of it from its perspective this is left
this is right this is down this is forward and this would be backwards
so let's using that set this up what we want is our left extent to be probably
1.25 meters so that it goes to the full extent of the block same with the right
bottom extent we want it to go out from the center of the block it's on probably
maybe a meter and a half to the other so let's go to point 5 for bottom top
extent only needs to go one point two five back extent now this needs to go
full fully through the block that it's attached to and then extend up
a little bit further so that we walk into it so let's make that 3.5 meters
front extent can be as small as possible and as small as possible for these is
one so found out whoops click one find out
click show on HUD you'll see that everything just went a bit red and funny
and that is our sensor range something else you might have been noticing during
this video is that I have this little hard element up here this is another mod
this is the build vision mod which is awesome and incredibly handy and I was
using it to set up things earlier but it's entirely not needed for this it's
just a nice thing to have so we can see our sensor range as I go into it it goes
green because right now it is set to the default and the default is set to detect
players so you can see the range that I've got I walk in here and then I walk
out and it'll turn off if we want that to control the door what we need to do
is right click on it again set up our actions and you've got to actions and
senses on the left here is your action as the sensor is triggered and on the
right here is the action as the sensor gets untreated so what we want is open
and closed and I really wish I had a better term than I'm triggered but I
think you know what I mean so as I walk in nothing's gonna happen because it's
already closed but as I walk out the doors gonna close now open close open
close so it's all gonna work without me having to interact with it at all
which is very very nice what if we want to have some sort of safety device
so if this elevator is down lower and we want to have a door up here and we've
actually got walls all around and it's not just a door out in the open well we
can do that and there's a very nice way to do that and have this door set up so
that it automatically opens just as the elevated car arrives and that takes
advantage of catwalk blocks catwalks are very thin so they'll only triggered from
the horizontal point of view just as they arrive
so they're the perfect thing to trigger something like this now the way I've
designed my elevator is not suited for having this setup but it's something I
want to show anyway so what we're going to do is we're gonna place a catwalk
plate out here we're then going to build a bit of a construction around here
actually let's put that catwalk down on this there let's put that window back in
now that we've got this little setup with the catwalk plate out there we can
set up a sensor that will detect it so if we put a sensor out here which it
won't allow us while the car is there so let's call it down to one of the lower
floors
it may not allow us to place it but it will be fine with having it there as it
comes back up so now that the sense is built we can bring the car back up and
let's start defining in our range and how this sensor is going to be triggered
what we would like it to do is just as the car is about to reach its maximum
height and be perfectly aligned we want it to trigger and open this safety door
so then that our other door can be triggered for us on its phone and the
reason we don't want this sensor on the car is if the car was triggering as it
detected this it would then also need a separate sensor on the car for this
floor and a separate sensor on the car for this floor and there's not much room
on the car what we're gonna do is we're going to show this on HUD we're going to
set our left extent to its minimum right to the minimum bottom now this is going
to be the measurement from the center of the block that the sensor is placed on
and we want to go just below the limit of that block so if we think of half of
2.5 is 1.25 why don't we set this to 1.4 and that'll be comfortably below that
top extent can be its minimum back can be the minimum in front we probably want
front to be about two meters maybe 2.5 actually let's try that let's see how
that looks it may need to be slightly larger I think that we'll be able to
detect that block there so let's make it so that it detects that instead of
detecting me if we keep scrolling down through the control panel here we'll get
to detect players we turn that off we turn subgrades on because the
elevator is 1 and we can see as we did that it went green and it's staying
green because it's detecting this sub-grid so we now set this up to access
our sliding door 5 which is our new one which is on the same grid as it so we
grab sensor and we go set up actions sliding
door 5 open and closed so as the elevator goes down if I hop in you
should be able to demonstrate this we see that the doors are open out there
and if I press to go down those doors close and then as I go back up those
doors will open just as I arrived and there we go we've got a safety door
that's fully functional now instead of showing you through all of how I put the
sound blocks together they use these same principles what I've got over here
is a sensor and we will go and find that sensor for the music so that's this
sensor we can see that it's that takes up because it's got the sound block
music play and it is covering this entire elevator car anywhere within this
area and that music will start playing as soon as I leave the area the music
will stop so that's a pretty simple one that's just a sensor that's on the
bottom of the car for the dings I set it up in the same way as that door so as we
pass a floor the car will trigger the ding except in this case because it's
not triggering a door the sensor can be on the car and I'll show you that sensor
so we have a look I've actually got a sound block there a
sensor under here and I believe I'm using this sensor as our ding sensor yep
so as it gets triggered it plays the ding sound which is why it's not
particularly accurate with the timing for the blocks so if you wanted to have
a ding that was very accurate what you would want to do is place it somewhere
on the side here and have it trigger against blocks like this where you know
exactly when they're going to arrive and that way the timing will be much much
closer or you could have the ding be triggered in exactly the same way as
this where the block is on here and instead of having this open a door it
would open it would play the ding sound you would be able to combine those
together on a timer block and we can show you that here we need a time the
block and we need a sound block something to actually play the ding so
we'll place those there and there and then what we want to do is since we
unlike the door only need the ding to play on a rival we don't need to play it
on leaving we can set this time of up to set up actions it is going to open the
door and it is going to play the ding now we need to make the sound block
actually play a ding so we'll click on sound block - we'll go down to ding if
you're not sure you got the right one just hit play and it'll play so then we
go to our sensor set up our actions and in this case what we wanted to do is
trigger now on the tunur block and then close this door on the leave the sensor
so on the enter it's gonna open the door and on the clothes on the leaving it's
gonna close it just as we had before but it's also trying to play the ding so
let's test that doors open automatically let's go down
to the middle floor down we go we've left that sensor range let's head back
up now let's see if this all works as expected there we go
ding and doors open perfect hopefully all of those tips are combined
for you guys to be able to build some incredible designs for your elevators
this one's pretty basic but I think it does the job
certainly not pretty once you start putting these catwalk plates on but I
reckon you could probably hide them underneath if you wanted to you would
need them to stick out a little way but probably do a better job of hiding them
than I have there are many other complex ways you could set these up you could
certainly have the floors and the lengths the Pistons need to extend
managed by a script which would probably work nicer one of the downsides of the
way I've set this up is if I go down I go down at different speeds as the
different Pistons finish their extension or retraction which you could definitely
get around with using a script but if you don't want to script that still
works it's not horrible I think it's actually pretty solid and it is a multi
floor vanilla elevator without a script so I'm pretty happy with it if you've
got any tips of your own make sure you share them in the comments or if you've
got any questions about anything I've done here ask away either in the
comments or head on over to discord and ask me their these designs will be up on
the workshop for you guys to have a closer look at well when I say designs I
really mean just this one and I will also be putting my ferris wheel up there
very soon as always there is plenty more to come so I'll see you then
Không có nhận xét nào:
Đăng nhận xét