Urban Terror Forums: Doors with a delay? - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Doors with a delay? Rate Topic: -----

#1 User is offline   BludShoT Icon

  • Account: bludshot
  • Main tag: [T]
  • Country:
  • Joined: 28-February 10
  • Posts: 1,269

Posted 18 June 2009 - 10:04 PM

Is it possible to make doors have a delay on them? Specifically I mean that if you have a door, I want to make it so when you activate the door to open it, it opens immediately just like a normal urt door, but then if I "use" it again, it won't close. It would have let's say a 2 second delay before I would be able to close it.

Any time the door has been closed or open, you could not close or open it for 2 seconds (or possibly some other number of seconds).

The purpose being to disable the ability to spam open-and-close doors.

It it possible to do this??

Thanks!

#2 User is offline   H3NRY Icon

  • Account: h3nry
  • Main tag: .um
  • Country:
  • Joined: 28-February 10
  • Posts: 2,787

Posted 18 June 2009 - 10:10 PM

yes actually.. i thought it was on 2 seconds by default.  i think if you set a key of "wait" then a value of 5 it would stay open AFTER pressing the close/open key before closing

#3 User is offline   NulL Icon

  •   former FS member   
    Level Designer
  • Account: null
  • Country:
  • Joined: 28-April 09
  • Posts: 2,606

Posted 18 June 2009 - 10:50 PM

Do you mean for rotating doors? I think I could probably make something that could do this.

#4 User is offline   Rambetter Icon

  •   community dev   
  • Account: rambetter
  • Joined: 28-February 10
  • Posts: 1,140

Posted 18 June 2009 - 11:19 PM

Blud, yes this is possible and I have actually done something quite similar to this in Icy Jumps.

I don't have my Radiant in front of me but I'll try to explain it from my recollections.

The idea is to make your door trigger_only.  You would actually be activating a button (I think it's func_button?) that indirectly points to the door.

STEP 1:  Make a button entity (func_button I think) that covers an area approximately equal to the door.  The button is completely invisible and the player will not even know that it exists.  Use some shader like this one for it:


textures/ramb_common/nonsolidcaulk
{
    qer_editorimage textures/ramb_common/caulk.jpg
    qer_trans 0.2
    surfaceparm nodraw
    surfaceparm nolightmap
    surfaceparm nonsolid
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm detail
}



This button should be completely stationary, figure out the "lip" and so on parameters so that it does not even move when you use it.  Also figure out the parameters so that the button has no delay between triggers - that is, if you push it 10 times in 1 seconds, it will actually activate 10 times.  Try to make it cover an area that includes both open and close door positions for your actual door.


STEP 2:

Make a trigger_multiple somewhere off the map (so the player will never be able to touch it).  The button created above should target this trigger_multiple.  Put a wait time of 2 seconds on this trigger_multiple.


STEP 3:

The trigger_multiple you created above should target the door that you make.  Once again, door is trigger_only.




I am using this technique all over the place in Icy Jumps 5a and in Icy World.  I have the .map files in my .pk3 so you can see for yourself.

Hope that helps, and happy fragging.


P.S.  One thing I don't like about my approach is that in the case of rotating doors, the "triggerable area" (which is what the invisible button covers) does not change depending on whether the door is open or closed.  So for example if your button covers both opens and closed door positions, you will be able to trigger a "door open" from further away from the door if you approach it from the side that it swings out to.

#5 User is offline   BludShoT Icon

  • Account: bludshot
  • Main tag: [T]
  • Country:
  • Joined: 28-February 10
  • Posts: 1,269

Posted 18 June 2009 - 11:36 PM

Quote

Also figure out the parameters so that the button has no delay between triggers - that is, if you push it 10 times in 1 seconds, it will actually activate 10 times.


Does this mean that if I go up to one of these doors, and press use 10 times in 1 second and then I run away, the door will open the first time I hit use, and then it will open and close 9 more times over the next 20 seconds even though I am on the other side of the map?

Or are you saying that the other 9 "activations" have no effect?

bullet_loaderAdvertisement

#6 User is offline   Delirium Icon

  •   QA member   
  • Account: delirium
  • Country:
  • Joined: 28-February 10
  • Posts: 5,416

Posted 18 June 2009 - 11:44 PM

take a look at the TP door, the garage one explains EXACTLY what your looking for

#7 User is offline   NulL Icon

  •   former FS member   
    Level Designer
  • Account: null
  • Country:
  • Joined: 28-April 09
  • Posts: 2,606

Posted 18 June 2009 - 11:54 PM

Quote

BludShoT link=topic=16494.msg224916#msg224916 date=1245364589]
Or are you saying that the other 9 "activations" have no effect?


This is correct, triggers don't buffer commands, if they're in a wait period they ignore all incoming requests.

#8 User is offline   BludShoT Icon

  • Account: bludshot
  • Main tag: [T]
  • Country:
  • Joined: 28-February 10
  • Posts: 1,269

Posted 19 June 2009 - 08:06 PM

Awesome.

Now that I know this can be done, I would like to recommend that mappers use this in any room where the only way(s) in are doors. For example, on ut_dam, the truck spawn has only 2 ways in and they are both doors. The big problem with it is that people can just camp the doors and keep closing them back on the enemy. So they can camp their spawn badly. With delayed doors this would be solved.

Now, whether ALL doors in urt should do this, I think that's another question (to which the answer is probably no!). There is a bit of cheapness that goes on in places like the double doors by pillars in turnpike for example, BUT, since it's not the only way in or out of an area, it's not really a problem, because you can just flank around.

If anyone ever re-does Dam and decides to keep the doors by the blue truck spawn, I hope they put in these delayed doors.

#9 User is offline   Stv Icon

  • Account: stv
  • Joined: 01-March 10
  • Posts: 183

Posted 24 June 2009 - 05:01 AM

wasnt dam forbidden to be redone, last time it was asked? IIRC?

#10 User is offline   BludShoT Icon

  • Account: bludshot
  • Main tag: [T]
  • Country:
  • Joined: 28-February 10
  • Posts: 1,269

Posted 24 June 2009 - 05:19 AM

It's another topic altogether, but, imho abandon-ware maps are fair game; when it's a choice between the mapper or dev team officially fixing a map or some noob mapper doing a piss poor redo of the map, then clearly no one should muck up a map like that. But when it's a choice between someone keeping an old abandoned map alive vs that map never being played again, then I don't see a problem with it, at least not a moral problem :)

But the thread is mainly about me finding out if a certain door thing can be done, and then keeping that in mind for myself but also pointing out to others that they might want to make use of this feature to stop some of the door spamming and cheapness that goes on sometimes with doors.

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942