Door Switch without using a Script Mover


(Jecoliah) #1

I have not seen this posted anywhere else.

I believe i have created a new method for doing this.

The problem with using a door switch is that the door could be opened by the players by standing in front of it and pressing the “use” button.

This solution is something i figured out and posted over on Surface Forums, link below.

http://www.wolfensteinx.com/surface/forums/showthread.php?s=&threadid=1792

It works good and you dont have to do any scripting :clap:

Anyways, here is a pic of the entities…

Let me know if this solution has been posted anywhere else.

Thanks,

Jec

The door on the left is a normal door, the one on the right can only be opened by using the switch.

And here is the map file…


// entity 0
{
"classname" "worldspawn"
// brush 0
{
( 3668 2332 1367 ) ( 3668 30 1367 ) ( 2127 2332 1367 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3668 2332 701 ) ( 2127 2332 701 ) ( 3668 2332 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2490 2130 701 ) ( 2490 2130 437 ) ( 2490 -172 701 ) common/caulk 20 0 0 0.5 0.5 0 0 0
( 2127 30 437 ) ( 2127 30 701 ) ( 3668 30 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 334 202 437 ) ( 334 2504 437 ) ( 334 202 701 ) common/caulk 40 0 0 0.5 0.5 0 0 0
( 2127 2332 1366 ) ( 3668 30 1366 ) ( 3668 2332 1366 ) fueldump/fueldumpsky 432.6827392578 6.6724853516 0 4.2109375 4.49609375 0 0 0
}
// brush 1
{
( 3668 2332 1367 ) ( 3668 30 1367 ) ( 2127 2332 1367 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3668 2332 701 ) ( 2127 2332 701 ) ( 3668 2332 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2490 2130 701 ) ( 2490 2130 437 ) ( 2490 -172 701 ) common/caulk 20 0 0 0.5 0.5 0 0 0
( 2125 30 435 ) ( 3666 30 435 ) ( 2125 2332 435 ) common/caulk 4 0 0 0.5 0.5 0 0 0
( 334 202 437 ) ( 334 2504 437 ) ( 334 202 701 ) common/caulk 40 0 0 0.5 0.5 0 0 0
( 3668 2331 437 ) ( 2127 2331 701 ) ( 3668 2331 701 ) fueldump/fueldumpsky 432.6827392578 238.9699707031 0 4.2109375 1.8203125 0 0 0
}
// brush 2
{
( 3668 2332 1367 ) ( 3668 30 1367 ) ( 2127 2332 1367 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3668 2332 701 ) ( 2127 2332 701 ) ( 3668 2332 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2490 2130 701 ) ( 2490 2130 437 ) ( 2490 -172 701 ) common/caulk 20 0 0 0.5 0.5 0 0 0
( 2125 30 435 ) ( 3666 30 435 ) ( 2125 2332 435 ) common/caulk 4 0 0 0.5 0.5 0 0 0
( 2127 30 437 ) ( 2127 30 701 ) ( 3668 30 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2489 -172 701 ) ( 2489 2130 437 ) ( 2489 2130 701 ) fueldump/fueldumpsky 505.327545166 238.9699707031 0 4.49609375 1.8203125 0 0 0
}
// brush 3
{
( 3668 2332 701 ) ( 2127 2332 701 ) ( 3668 2332 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2490 2130 701 ) ( 2490 2130 437 ) ( 2490 -172 701 ) common/caulk 20 0 0 0.5 0.5 0 0 0
( 2125 30 435 ) ( 3666 30 435 ) ( 2125 2332 435 ) common/caulk 4 0 0 0.5 0.5 0 0 0
( 2127 30 437 ) ( 2127 30 701 ) ( 3668 30 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 334 202 437 ) ( 334 2504 437 ) ( 334 202 701 ) common/caulk 40 0 0 0.5 0.5 0 0 0
( 2125 2332 436 ) ( 3666 30 436 ) ( 2125 30 436 ) fueldump/cave_floor 4 0 0 0.5 0.5 0 0 0
}
// brush 4
{
( 3668 2332 1367 ) ( 3668 30 1367 ) ( 2127 2332 1367 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2490 2130 701 ) ( 2490 2130 437 ) ( 2490 -172 701 ) common/caulk 20 0 0 0.5 0.5 0 0 0
( 2125 30 435 ) ( 3666 30 435 ) ( 2125 2332 435 ) common/caulk 4 0 0 0.5 0.5 0 0 0
( 2127 30 437 ) ( 2127 30 701 ) ( 3668 30 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 334 202 437 ) ( 334 2504 437 ) ( 334 202 701 ) common/caulk 40 0 0 0.5 0.5 0 0 0
( 3668 31 437 ) ( 2127 31 701 ) ( 2127 31 437 ) fueldump/fueldumpsky 432.6827392578 238.9699707031 0 4.2109375 1.8203125 0 0 0
}
// brush 5
{
( 3668 2332 1367 ) ( 3668 30 1367 ) ( 2127 2332 1367 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3668 2332 701 ) ( 2127 2332 701 ) ( 3668 2332 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 2125 30 435 ) ( 3666 30 435 ) ( 2125 2332 435 ) common/caulk 4 0 0 0.5 0.5 0 0 0
( 2127 30 437 ) ( 2127 30 701 ) ( 3668 30 437 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 334 202 437 ) ( 334 2504 437 ) ( 334 202 701 ) common/caulk 40 0 0 0.5 0.5 0 0 0
( 335 202 701 ) ( 335 2504 437 ) ( 335 202 437 ) fueldump/fueldumpsky 505.327545166 238.9699707031 0 4.49609375 1.8203125 0 0 0
}
// brush 6
{
( 1186 1284 511 ) ( 1186 1266 511 ) ( 1184 1284 511 ) assault/metal_c06 0 0.125 0 0.015625 0.039062351 0 0 0
( 1186 1280 511 ) ( 1184 1280 511 ) ( 1186 1280 489 ) assault/metal_c06 0 25.5654296875 0 0.015625 0.0390626043 0 0 0
( 1186 1284 511 ) ( 1186 1284 489 ) ( 1186 1266 511 ) assault/metal_c06 127.9375 25.5654296875 0 0.078124702 0.0390626043 0 0 0
( 1184 1266 501 ) ( 1186 1266 501 ) ( 1184 1284 501 ) assault/metal_c06 0 0.125 0 0.015625 0.039062351 0 0 0
( 1184 1270 489 ) ( 1184 1270 511 ) ( 1186 1270 489 ) assault/metal_c06 0 25.5908203125 0 0.015625 0.0390625298 0 0 0
( 1184 1266 489 ) ( 1184 1284 489 ) ( 1184 1266 511 ) assault/metal_c06 0.0751953125 25.5654296875 0 0.0781253576 0.0390626043 0 0 0
}
}
// entity 1
{
"classname" "info_player_deathmatch"
"origin" "1399 1192 483"
"angle" "180"
}
// entity 2
{
"classname" "func_door"
"targetname" "door_switch_1"
"angle" "270"
"spawnflags" "4"
"type" "5"
"speed" "75"
"target" "lock_unlock_2"
// brush 0
{
( 1156 1445 637 ) ( 1156 1310 637 ) ( 1151 1445 637 ) assault/metal_c06 64 142.0146484375 0 0.0625 0.53515625 0 0 0
( 1156 1446 637 ) ( 1151 1446 637 ) ( 1156 1446 445 ) assault/metal_c06 64 81.3333740234 0 0.0625 0.75 0 0 0
( 1156 1445 637 ) ( 1156 1445 445 ) ( 1156 1310 637 ) swf/door_loper 227.970703125 162.6667480469 0 0.267578125 0.375 0 0 0
( 1151 1310 445 ) ( 1156 1310 445 ) ( 1151 1445 445 ) assault/metal_c06 64 142.0146484375 0 0.0625 0.53515625 0 0 0
( 1151 1309 445 ) ( 1151 1309 637 ) ( 1156 1309 445 ) assault/metal_c06 64 81.3333740234 0 0.0625 0.75 0 0 0
( 1148 1309 445 ) ( 1148 1444 445 ) ( 1148 1309 637 ) swf/door_loper 227.970703125 162.6667480469 0 0.267578125 0.375 0 0 0
}
}
// entity 3
{
"classname" "func_invisible_user"
"target" "lock_unlock_1"
"cursorhint" "HINT_ACTIVATE"
"spawnflags" "8"
"scriptname" "lock_unlock_door1"
// brush 0
{
( 1192 1285 516 ) ( 1192 1266 516 ) ( 1184 1285 516 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( 1193 1284 515 ) ( 1185 1284 515 ) ( 1193 1284 485 ) common/trigger 62 30 0 0.5 0.5 0 0 0
( 1192 1285 515 ) ( 1192 1285 485 ) ( 1192 1266 515 ) common/trigger 32 30 0 0.5 0.5 0 0 0
( 1184 1266 484 ) ( 1192 1266 484 ) ( 1184 1285 484 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( 1184 1266 485 ) ( 1184 1266 515 ) ( 1192 1266 485 ) common/trigger 0 30 0 0.5 0.5 0 0 0
( 1184 1266 485 ) ( 1184 1285 485 ) ( 1184 1266 515 ) common/trigger 32 30 0 0.5 0.5 0 0 0
}
}
// entity 4
{
"classname" "trigger_multiple"
"target" "door_switch_1"
"scriptname" "lock_unlock_door2"
// brush 0
{
( 1186 1281 512 ) ( 1186 1270 512 ) ( 1184 1281 512 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( 1186 1282 516 ) ( 1184 1282 516 ) ( 1186 1282 484 ) common/trigger 0 30 0 0.5 0.5 0 0 0
( 1187 1281 516 ) ( 1187 1281 484 ) ( 1187 1270 516 ) common/trigger 32 30 0 0.5 0.5 0 0 0
( 1185 1270 488 ) ( 1187 1270 488 ) ( 1185 1281 488 ) common/trigger 62 32 0 0.5 0.5 0 0 0
( 1184 1269 484 ) ( 1184 1269 516 ) ( 1186 1269 484 ) common/trigger 0 30 0 0.5 0.5 0 0 0
( 1184 1270 484 ) ( 1184 1281 484 ) ( 1184 1270 516 ) common/trigger 32 30 0 0.5 0.5 0 0 0
}
}
// entity 5
{
"classname" "target_lock"
"origin" "1288 1275 500"
"target" "door_switch_1"
"targetname" "lock_unlock_1"
"angle" "-90"
}
// entity 6
{
"classname" "func_door"
"angle" "90"
"spawnflags" "4"
"type" "5"
"speed" "75"
// brush 0
{
( 1126 1309 637 ) ( 1190 947 637 ) ( 1126 947 637 ) assault/metal_c06 48 246.5882568359 0 0.0625 0.53125 0 0 0
( 1204 1083 445 ) ( 1140 1083 637 ) ( 1140 1083 445 ) assault/metal_c06 48 81.3333740234 0 0.0625 0.75 0 0 0
( 1190 1309 445 ) ( 1126 947 445 ) ( 1190 947 445 ) assault/metal_c06 48 246.5882568359 0 0.0625 0.53125 0 0 0
( 1197 947 637 ) ( 1133 947 445 ) ( 1133 947 637 ) assault/metal_c06 48 81.3333740234 0 0.0625 0.75 0 0 0
( 1149 943 637 ) ( 1149 1305 445 ) ( 1149 1305 637 ) swf/door_loper 18.82421875 162.6667480469 0 0.2656250596 0.3749999702 0 0 0
( 1157 1307 637 ) ( 1157 945 445 ) ( 1157 945 637 ) swf/door_loper 18.8259277344 162.6667480469 0 0.265625149 0.3749999702 0 0 0
}
}
// entity 7
{
"classname" "func_group"
// brush 0
{
( 1120 883 701 ) ( 1568 1510 701 ) ( 1568 883 701 ) xlab_wall/xconcrete_c58m 35.2240600586 92.3261184692 -90 0.9800000191 0.9800000191 0 0 0
( 1120 1526 701 ) ( 1568 1526 637 ) ( 1568 1526 701 ) xlab_wall/xconcrete_c58m 120 80.25 0 -0.5 0.5 0 0 0
( 1584 1494 701 ) ( 1584 867 637 ) ( 1584 867 701 ) xlab_wall/xconcrete_c58m 138 80.25 0 -0.5 0.5 0 0 0
( 1568 867 637 ) ( 1120 867 701 ) ( 1568 867 701 ) xlab_wall/xconcrete_c58m 120 80.25 0 -0.5 0.5 0 0 0
( 1104 867 701 ) ( 1104 1494 637 ) ( 1104 1494 701 ) xlab_wall/xconcrete_c58m 138 80.25 0 -0.5 0.5 0 0 0
( 1568 1510 637 ) ( 1120 883 637 ) ( 1568 883 637 ) xlab_wall/xconcrete_c58m 35.2240600586 92.3261184692 -90 0.9800000191 0.9800000191 0 0 0
}
// brush 1
{
( 1120 1510 100 ) ( 1568 1510 445 ) ( 1120 1510 445 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 1510 100 ) ( 1568 883 445 ) ( 1568 1510 445 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 883 100 ) ( 1120 883 445 ) ( 1568 883 445 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1120 883 100 ) ( 1120 1510 445 ) ( 1120 883 445 ) xlab_wall/xconcrete_c58m 180 122.25 0 0.5 0.5 0 0 0
( 1120 883 445 ) ( 1568 1510 445 ) ( 1568 883 445 ) xlab_wall/xconcrete_c58m 136 32 0 0.5 0.5 0 0 0
( 1647 1508 437 ) ( 1199 881 437 ) ( 1647 881 437 ) xlab_wall/xconcrete_c58m 127.75 24 180 0.5 0.5 0 0 0
}
// brush 2
{
( 1120 883 637 ) ( 1568 947 637 ) ( 1568 883 637 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1568 947 445 ) ( 1568 883 637 ) ( 1568 947 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 947 445 ) ( 1120 883 445 ) ( 1568 883 445 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1568 883 637 ) ( 1120 883 445 ) ( 1120 883 637 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1120 883 445 ) ( 1120 947 637 ) ( 1120 883 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1120 947 637 ) ( 1568 947 445 ) ( 1568 947 637 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
}
// brush 3
{
( 1504 1446 637 ) ( 1568 947 637 ) ( 1504 947 637 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1504 1446 637 ) ( 1568 1446 445 ) ( 1568 1446 637 ) xlab_wall/xconcrete_c58m 192.25 58.25 0 0.5 0.5 0 0 0
( 1568 1446 637 ) ( 1568 947 445 ) ( 1568 947 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 1446 445 ) ( 1504 947 445 ) ( 1568 947 445 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1568 947 445 ) ( 1504 947 637 ) ( 1568 947 637 ) xlab_wall/xconcrete_c58m 138.25 58.25 0 0.5 0.5 0 0 0
( 1504 947 637 ) ( 1504 1446 445 ) ( 1504 1446 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
}
// brush 4
{
( 1120 1446 637 ) ( 1568 1510 637 ) ( 1568 1446 637 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1120 1510 637 ) ( 1568 1510 445 ) ( 1568 1510 637 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 1510 445 ) ( 1568 1446 637 ) ( 1568 1510 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1120 1510 445 ) ( 1568 1446 445 ) ( 1568 1510 445 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1120 1446 637 ) ( 1120 1510 445 ) ( 1120 1510 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1568 1446 445 ) ( 1120 1446 637 ) ( 1568 1446 637 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
}
// brush 5
{
( 1120 1309 637 ) ( 1184 947 637 ) ( 1120 947 637 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1184 1309 445 ) ( 1120 1309 637 ) ( 1120 1309 445 ) xlab_wall/xconcrete_c58m 254.4454956055 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1184 1309 445 ) ( 1120 947 445 ) ( 1184 947 445 ) xlab_wall/xconcrete_c58m 192.25 76 0 0.5 0.5 0 0 0
( 1191 1083 637 ) ( 1127 1083 445 ) ( 1127 1083 637 ) xlab_wall/xconcrete_c58m 124.25 58.25 0 0.5 0.5 0 0 0
( 1120 947 637 ) ( 1120 1309 445 ) ( 1120 1309 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
( 1184 1309 637 ) ( 1184 947 445 ) ( 1184 947 637 ) xlab_wall/xconcrete_c58m 211.8477783203 210.2078094482 0 0.7699999809 0.7699999809 0 0 0
}
}
// entity 8
{
"classname" "target_relay"
"origin" "1288 1200 500"
"targetname" "lock_unlock_1"
"target" "door_switch_1"
"angle" "-90"
}
// entity 9
{
"classname" "target_lock"
"origin" "1288 1398 500"
"angle" "-90"
"targetname" "lock_unlock_2"
"key" "-1"
"target" "door_switch_1"
}
// entity 10
{
"classname" "light"
"origin" "1354 1192 600"
"light" "400"
}

(kamikazee) #2

This approach is not really new (though you might be the first one to post such a whole prefab) but is rarely used because a “locked” sign pops up every time you come close to the door. Most people don’t want this and make doors with the script_mover approach.


(RayBan) #3

you can get rid of the locked door sign by making a brush that extends out about 8 units around the door and make that brush a
func_invisible_user with the key/val of cursorhint/HINT_NONE, that way the door signs of locked or usable wont show, even
though the doors can be used or you will hear the locked sound if its locked. its also a good way to have hidden doors that
players wont know can be accessed until they try them, because they wont see any indicators when they walk up to them.

script movers are ok, but they door require the scripting, plus the fact that those types of doors can crush you.


(Jecoliah) #4

Thanks RayBan, Yes the whole point of this is that you dont have to do any scripting :smiley:

Nice solution for the cursor hint :banana:

Jec