Problem With Func_door

kawakkawak Join Date: 2003-01-11 Member: 12160Members, Constellation
<div class="IPBDescription">Possibility to block them?</div> Hello!

I have a problem with an elevator and 2 func_door.
The elevator is a func_train with many track_corner.

The track_corner target the func_door (with the "fire on pass") to close/open them.

But if somebody "block" the door when it's closing...raarg, the door go back to the top (so the "processus" is inversed and the door is open when it should be close).

So i'd like to know if there is a way to stop the func_door when something block it (like does the func_train) ?
Or should i use a func_train (more entity.. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo--> )

Comments

  • KageKage Join Date: 2002-11-01 Member: 2016Members
    I think that the easiest solution would be to have the doors crush whatever gets in their way.
  • RokiyoRokiyo A.K.A. .::FeX::. Revenge Join Date: 2002-10-10 Member: 1471Members, Constellation
    A door is only ever "blocked" when it traps an entity between itself and a world brush. Therefore if you want doors that can never be "blocked", simply chop your door in half and have the two halfs open outwards.

    That way when they are being closed, and a player or building gets in the way, they'll stay paused for a moment as they slowly kill whatever is in the way, and then they continue closing (because there never was a world brush there to stop the door from closing. I think if you build the door frame out of func_walls you might get the same effect, but I'm not sure).

    If you set the damage value on the doors to -1 it will instantly destroy ANYTHING that jams them, and you wont even notice a slight pause in the door movement. If you want the players a short amount of time to get out of the way, make the damage value something like 5 to 10, as that amount of damage will be dealt EVERY frame. This unfortunately makes the doors unpredictable, as servers running at 400fps will easily hand out 4000 damage every second, while a server running at 30fps would only do 300 damage in the same amount of time. In the first server your brand spanking new onos just died, and the second he still has atleast another second to get out of the way...
  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    If you want a door at each floor the elevator arrives at, there is a solution that involves using func_doors. The trick is to use the 'Fire on Close' key for the func_doors. Have the func_doors target the elevator, and have your elevator's button target the door for the floor it is currently on. So when a player pushes the button, the door closes, and when/if the door closes the elevator will start moving. If someone blocks the door then nothing happens, so the sequence is preserved. When the elevator arrives at the next floor you can have the path_corner target that door and open it.

    To ensure that the button only targets the correct door, you can use some trigger_changetargets or a system of multisources and env_globals that store the state of the elevator. I'll explain this part further if you need help on it.
  • kawakkawak Join Date: 2003-01-11 Member: 12160Members, Constellation
    edited October 2003
  • kawakkawak Join Date: 2003-01-11 Member: 12160Members, Constellation
    ok, thank you guys

    Revenge, i tried what you say about the door/world brush.. But it's not working (i tried with 2 func_door(First 1 starts from the top, second 1 from the floor).., and i tried the other "solution" with a func_wall on the floor.
    This is the same, when the door gets blocked it goes back to the top.

    Same thing happend if i enter a value for the "damage inflicted when..." (-1, 5000, etc..)

    So like i dont want to use too much entity, i think i will let this like it is actually. (and maybe that this is good for the gameplay, allow players to "disturb" the elevator..)
  • ParallaxParallax Join Date: 2002-11-08 Member: 7739Members, Constellation, Reinforced - Supporter
    Nice call Yamazaki! That sounds just like a real elevator. If I was implimenting an elevator with doors that would be the only way to go <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    -Tom
  • RokiyoRokiyo A.K.A. .::FeX::. Revenge Join Date: 2002-10-10 Member: 1471Members, Constellation
    That's strange...

    I haven't had access to a computer capable of running hammer for about a month now (this one can't do windowed opengl), but gimme a few weeks and I'll be able to get back on track.

    I do remember though in my map I had a whole bunch of func_doors that closed into each other (same as you had, 1 coming down, 1 coming up and both meeting in the middle). They both moved REALLY slowly (it took around 10 seconds to shut these doors, and they were about as tall as an onos with a skulk standing on top of it. They were trigged by one of two different buttons on either side of the doors...

    I don't think I had set anything else that caused them to have the effect of slowly crushing whatever they caught...
Sign In or Register to comment.