door with a button


(jkfloris) #1

In the battery there are doors with a switch
does anyone know how they made them,
because I want I make a rotating door with
a button or switch.

floris


(SmeTskE) #2

lol
i had a plan too about a door that could go open, but mine is exact the same as in battery it slides open, and it has 2 switches, one inside, one outside :clap:
if someone can help
plz do :slight_smile:


([rD]MrPink) #3

Make the door into a script_mover.


(Lockeownzj00) #4

That’s easy. You don’t need script_mover… You can just make a func_invisible_user, set the cursorhint to HINT_ACTIVATE, choose not_kickable, then link it to your door. Voila! A button!

Note: The func_invisible_user will be invisible, so put something else that is the actual button behind it.


(Ubiquitous) #5

How do you make the lever animate then?


(lennyballa) #6

well, when i use it, i’m still able to open door by just standing near it??
How can i prevent this>?


(lennyballa) #7

Noone knows? I’m trying something like the one in assault, from rtcw. Only from one side


(chavo_one) #8

The traditional way to do this is to make your door a script_mover and the lever another script_mover. Use a func_invisible_user to trigger a target_script_trigger which then gets the scripting going to move the script_movers in the proper directions.

Our very own sock wrote a tutorial to do exactly this:
http://www.planetquake.com/simland/pages/wolftut/tut01_door1.htm

The only thing is that this was written for RtCW, so there may be some conversion issues.


(Erik-Ftn) #9

Hi

Lenny, I’m exactly at the same point.

I want a medics only building.

I started with a standard rotating door which I can open. Now I want only medics to be able to open that door.

Using trigger_multiple
The trigger_multiple lets me choose which classes and teams triggers it. Only medics now triggers my door but when a target value is set in the door entity the door wont open, it’s permanently locked. When crossing the trigger as medic the door makes a frustrated can’t open sound. I then add key = 0 on the door and now the trigger works great, though now the door is always open (ie unlocked).

Using func_invisible_user
This also works, I get the hand-hint cursor, press usekey and the door opens. The target the door gets assigned by func_invisble_user doesn’t lock it in any way and the door can be opened normally, it’s unlocked. This function doesn’t seem to be able to tell the difference between player classes though.

So, how to make this happen??? There is probably some keys to func_door_rotating which solves this. Anyone? It seems to be an ET-only issue.

----- another (amusing?) solution to the medics building ---------
I then created a building with the flat roof beeing a door rotating 225 degrees and effectively serving as a drawbrige kind of entrance - you can’t reach the roof/ door from outside the building. A medic only trigger_multiple opens/ swings the roof so you may enter the building on the now open roof, the roof then swings shut. Now, the problem here is that this door swings alternating outwards/ inwards and I want to swing just one way all the time. (ie when inside the building the door will swing inwards and when hitting me, it recoils - im stuck inside my building :eek2: ) How to make that rotating door only go one way, “angle” doesn’t seem to do anything?

thx in advance gurus

Erik

Would be intersting with:

i) an exhaustive list of func_door_rotating keys like this one on func_door (http://www.qeradiant.com/manual/Q3Rad_Manual/appndx/appn_b_2.htm#func)
ii) more info about the trigger/ invisible_user funcs in regard to ET.


(Erik-Ftn) #10

BTW, Temple2 probably has the func_invisble_user function in the traps in the Temple. The trapdoors are useable themselves just like for us.

The chrusher trap (prob 2 sliding doors with spikes :slight_smile: ) disappears behind some brush and is not useable because of that I think.

I didn’t find any reference to the traps in the Temple2 scriptfile. Perhaps even the moving levers are also really small doors…

Erik


(flashkillaman) #11

maybe allow teams like axis,cvops dont know if correct


(damocles) #12

As chavo already pointed out, if you want to avoid the troubles of people opening doors you don’t want them too, make the doors scripted moves instead of doors. Yeah it means more sciprting work, but get used to it. ET has a LOT of scripting.

For the medic door thing, use a trigger_multiple as mentioned before, then make it target a target_script_trigger entity to call the door toggle state script. The door would be automated, but such is life.

If you absolutely must have the door operated either by itself or by a switch, then set a func_invis_user over a switch or the door mover that triggers the trigger_multiple into turning on. This then opens the door, and another bit of scripting turns the trigger_multiple back off again after a short delay.


(Erik-Ftn) #13

EDITED to remove redundancy.

func_invisible_user -> door
|
v
really small door that looks like a lever/button

with the invis_user placed close to/ covering the button solves half the prob.

The door can still be opened the normal way though and you’ll have to build eg an elevator which u can’t reach and only can call down with the button.


(seven_dc) #14

You mean that by using func_invisible_user and linking it to door you can also link it ei. shooter_rocket to create cool traps.
How this is made in practise? Can func_invisible_user have two or more target parameters? tell it like I was a noob :smiley:


MARY JANE


(Erik-Ftn) #15

The answer is yes! :drink:

A func_invisible_user entity is created and given the target t1.

Now, if you create several other entities and give them all targetname t1 they will all be used by the func_invisible_user.

EDITED

I just connected one func_invisble_user to :

  • one shooter_rocket
  • one func_door
  • one func_door_rotating
  • one target_smoke
  • one target_effect
  • one func_explosive

and then set them all off by pressing usekey. :drink:

You can also do this

invis_user-> door -> shooter_rocket and get a trap.

Erik-Ftn


(Erik-Ftn) #16

Button only door, prefab

Here is, finally, a way to make a button only door with no scripting.

In this prefab I have a locked rotating door. When pushing a button (another door), the door is unlocked, opened, and then locked again.

Even if you maybe don’t yet have the entities I used, there should be no problem including and compiling this in your maps. (EDIT: Note: There is no guarantee that this will be hassle free in ET, since the entity is not in ET’s standard release/ in Radiants ET_entitites.def . Though I’ve not seen any problems so far.) /EDIT

cheers

Erik-Ftn

(I’ll be posting about this entity later.)

// entity 0
{
"classname" "worldspawn"
}
// entity 1
{
"targetname" "door_b_t27"
"target" "door_b_t26"
"key" "-1"
"origin" "-360 24 80"
"classname" "target_lock"
}
// entity 2
{
"target" "door_b_t26"
"targetname" "door_b_t25"
"classname" "target_lock"
"origin" "-280 24 80"
"key" "0"
}
// entity 3
{
"target" "door_b_t25"
"wait" "2"
"targetname" "door_b_t24"
"origin" "-320 -24 80"
"classname" "func_timer"
}
// entity 4
{
"target" "door_b_t26"
"targetname" "door_b_t25"
"wait" "0.5"
"origin" "-320 8 80"
"classname" "target_delay"
}
// entity 5
{
"target" "door_b_t27"
"targetname" "door_b_t25"
"classname" "target_delay"
"origin" "-360 -8 80"
"wait" "1"
}
// entity 6
{
"wait" "1"
"speed" "500"
"target" "door_b_t24"
"angle" "180"
"classname" "func_door"
// brush 0
{
( -232 16 72 ) ( -248 16 72 ) ( -248 0 72 ) metal_misc/metal_m04g2-r -112 16 0 0.500000 0.500000 0 0 0
( -248 0 88 ) ( -248 16 88 ) ( -232 16 88 ) metal_misc/metal_m04g2-r -112 16 0 0.500000 0.500000 0 0 0
( -248 0 88 ) ( -232 0 88 ) ( -232 0 72 ) metal_misc/metal_m04g2-r -112 80 0 0.500000 0.500000 0 0 0
( -232 0 88 ) ( -232 16 88 ) ( -232 16 72 ) metal_misc/metal_m04g2-r -16 80 0 0.500000 0.500000 0 0 0
( -232 16 88 ) ( -248 16 88 ) ( -248 16 72 ) metal_misc/metal_m04g2-r -112 80 0 0.500000 0.500000 0 0 0
( -248 16 88 ) ( -248 0 88 ) ( -248 0 72 ) metal_misc/metal_m04g2-r -16 80 0 0.500000 0.500000 0 0 0
}
}
// entity 7
{
"key" "-1"
"targetname" "door_b_t26"
"classname" "func_door_rotating"
// brush 0
{
( -296 96 40 ) ( -336 96 40 ) ( -336 56 40 ) wood/wood_m01_usat -368 144 0 0.500000 0.500000 0 0 0
( -336 56 112 ) ( -336 96 112 ) ( -296 96 112 ) wood/wood_m01_usat -368 144 0 0.500000 0.500000 0 0 0
( -336 56 112 ) ( -296 56 112 ) ( -296 56 40 ) wood/wood_m01_usat -368 208 0 0.500000 0.500000 0 0 0
( -328 48 112 ) ( -328 88 112 ) ( -328 88 40 ) wood/wood_m01_usat -400 208 0 0.500000 0.500000 0 0 0
( -296 96 112 ) ( -336 96 112 ) ( -336 96 40 ) wood/wood_m01_usat -368 208 0 0.500000 0.500000 0 0 0
( -336 96 112 ) ( -336 56 112 ) ( -336 56 40 ) wood/wood_m01_usat -400 208 0 0.500000 0.500000 0 0 0
}
// brush 1
{
( -336 96 112 ) ( -336 56 112 ) ( -336 56 40 ) common/origin -16 16 0 0.500000 0.500000 0 15 0
( -296 64 112 ) ( -336 64 112 ) ( -336 64 40 ) common/origin -48 16 0 0.500000 0.500000 0 15 0
( -328 16 112 ) ( -328 56 112 ) ( -328 56 40 ) common/origin -16 16 0 0.500000 0.500000 0 15 0
( -336 56 112 ) ( -296 56 112 ) ( -296 56 40 ) common/origin -48 16 0 0.500000 0.500000 0 15 0
( -336 56 112 ) ( -336 96 112 ) ( -296 96 112 ) common/origin -48 16 0 0.500000 0.500000 0 15 0
( -296 96 40 ) ( -336 96 40 ) ( -336 56 40 ) common/origin -48 16 0 0.500000 0.500000 0 15 0
}
}