Elevator with bugged doors Created 1 week ago2018-08-07 15:40:57 UTC by torekk torekk

Created 1 week ago2018-08-07 15:40:57 UTC by torekk torekk

Posted 1 week ago2018-08-07 15:40:57 UTC Post #340444
So I wrote about this in the shoutbox already, but don't want to spam it and maybe creating this thread helps someone else as well.

I followed this tutorial: https://twhl.info/wiki/page/Tutorial%3A_Elevator_Doors_that_move

And the elevator works all fine for a time and then suddenly, the doors get out of sync and the elevator stops moving.
At about 2:00 minutes in the video I switch to blood1 from Richman to show that his elevator doesn't bugs out, no matter if you move while pressing the button or not. I think this is the cause for the doors getting out of sync, but I'm not sure(well in the video the elevator works if you don't move). I know that the tutorial uses delays on the path_corners, I removed those and it still didn't change anything(well besides I had to get the doors in sync with the multimanager instead). The elevator from Richman however uses several trigger_relays that get triggered by the path_corners once the doors pass them, as seen here: https://twhl.info/journal/view/8958

But even though I've been taking a look at his elevator setup now for about 2 days, I don't quite get the logic behind it. GoldSrc's way of showing in/outputs, or better the lack of that, isn't helpful as well, in Source that'd be easy as cake.
torekk torekkProcrastinator of the Year
Posted 1 week ago2018-08-07 20:49:39 UTC Post #340446
If it looks buggy than you should use Spirit of Half-Life because SoHL has "moves with system"
If you trigger elevator and 2 normal doors ( other method without path_corner for doors ) elevator should assign "moves with" to both same doors. You can try spritedemo of Spirit of Half-Life. ( If you use bsptwomap or winbspc than you can check elevator with doors via moveswith than you will know that. )

normal elevator with doors ( method like you made ) = it is very incompatible because Half-Life engine is like old than you need use Half-Life SDK and replacement of SoloKiller's fabs().

Because Half-Life SDK from GitHub is very latest build and has new version. I hope you have not problem.

If you don't like Spirite of Half-Life and you can SoHL's source copy MovesWith.cpp and MovesWith.h into your Half-Life SDK and make sure find with and add or replace with from SoHL and HL-SDK from GitHub and you can write own and moveswith will work fine.

Good luck.

EDIT SoHL 1.9
God thanks because Russian Cat has made SoHL latest version but it works fine under Half-Life from Steam too. I already tested it and it works fine 100 %.
Posted 1 week ago2018-08-08 02:52:19 UTC Post #340447
Thanks for the suggestion, I may look into at some time, but for now I'd like to stay as close to vanilla as possible.

And propably this is an engine glitch, however as you can see Richman figured out a vanilla way around this, so it is possible without any mods.

I'm still unsure if I shouldn't just copy his elevator and adjust it to fit my needs, seeing that he released some of his map files for people to learn and use them, as long as you credit him for his works. But then I don't really learn anything, I already know how to copy&paste.

I figured another thing about his elevator, his top and bottom multimanager have the same delays, while mine(and the one from the tutorial) only use a delay on the bottom multimanager, which I guess is what causes it to desync. However if I'd just add a delay to the top multimanager, that'd cause it to desync as well.

I guess I gotta take some time and see if I can create like a flowmap of his entity setup for the elevator, else I don't know how to understand it. I mean he's using 8 doors on the elevator and then 4 on each floor for the outer doors, all which trigger seperate trigger_relays on the path_corners they pass. Just thinking about it gives me a headache.
torekk torekkProcrastinator of the Year
Posted 1 week ago2018-08-08 14:00:59 UTC Post #340452
I guess I gotta take some time and see if I can create like a flowmap of his entity setup for the elevator, else I don't know how to understand it. I mean he's using 8 doors on the elevator and then 4 on each floor for the outer doors, all which trigger seperate trigger_relays on the path_corners they pass. Just thinking about it gives me a headache.
Because it is hard to resolve - I think you can try with Spirit of Half-Life / DevKit / Map Sources / elevatordemo.map and you can try it and how does elevator works - If you like 4 doors like in hospital or warehouse than you should remember func_door -> lip unit of door width than it is easy. Make sure - / +

Or You can ask here best mapper "Urby"
Posted 1 week ago2018-08-09 04:35:21 UTC Post #340456
I think you misunderstood me, I know how the doors themselves work as func_doors, that's not the problem.

I'm talking about the elevator doors, those which are func_trains. The tutorial uses env_global and multi_managers together with a delay on the bottom multimanager to get the doors in sync with the elevator, while Richman uses trigger_relays, multi_managers and multisources and both his multi_managers have the same delay. I don't know how he gets the elevator that way to be in sync with the door, I bet it has to do with his func_train doors triggering all those trigger_relays that you can see in my journal entry's screenshot.

And for that I plan to make a flowchart, like this example from here:
User posted image
Edit: I tried, but I reached a point where even the flowchart would get too complicated:
User posted image
I didn't even include the delays or triggerstates for the trigger_relays yet...
torekk torekkProcrastinator of the Year
You must be logged in to post a response.