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!
Advertisement
Doors with a delay?
#4
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:
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.
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
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?
Advertisement
#8
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.
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.
#10
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.
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.
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement