To go with my One-way Glass tutorial is this One-way wall method.
What I’ve done is start with my Sawblade shack.
I removed the Sawblade objects and the door.
In place of the door I created a brush and converted it to func_wall_toggle.
This is an interesting entity. It’s a brush based entity that can be toggled on and off.
The awesome thing about it is that when off the brush is non-solid and invisible.
A few words of warning.
On one side of the func_wall_toggle I’ve applied the combine texture:
Obviously you can substitute with the texture of your choice.
On the outside face I’ve textured the func_wall_toggle with the same texture as the outside of the shack:
Again, use whichever texture fits your purpose.
All other faces are textured with nodraw. tools/toolsnodraw
There are several properties for the func_wall_toggle, however I have not changed any of the default settings, such as FX or Shadows, but I did give it a name, Wall01.
It needs a name because we are going to toggle it with a trigger_multiple.
And in this trigger_multiple I’ve created 2 Outputs.
Start Disabled: No
Delay Before Reset: 1
OnStartTouch, Wall01, Toggle
OnEndTouch, Wall01, Toggle
Placement of this trigger_multiple is very important for the effect to work properly.
We want players in the shack to have the ability to walk out.
But players can not get back in.
See how the trigger_multiple is placed, and how it goes to the opposite face of the door?
Notice how the func_wall_toggle blends right in on the outside of the shack.
Note: If you are not sure how to create a trigger_multiple please refer to my tutorial on Sliding Doors.
Obviously this method can be used for a variety of map features, such as traps, secret passages or simple One-way sections.
As a bonus I went ahead and created a trap on the outside of the shack.
This trap is made from 9 func_wall_toggle’s all with the same name, Wall02.
On the ground I’ve placed a decal so you can see the spot that will activate the trap.
When the game loads the trap will not be visible and it will not be solid.
There are two trigger_multiple’s inside the trap.
One of them is small and is named TrapTrigger, so it can be disabled and enabled.
The other larger one is has the same dimensions as the inside of the trap.
This is so we can hide the trap once the player leaves/dies.
OnStartTouch, Wall02, Toggle, 0.00
OnStartTouch, TrapTrigger, Disable, 0.25
OnEndTouch, Wall02, Toggle, 0.00
OnEndTouch, TrapTrigger, Enable, 0.25
Notice that we’ve added a 1/4 second delay to the Enabling and Disabling of TrapTrigger.
This 1/4 second is for insurance, helps to smooth things out.
When the player steps on the decal, actually in the small trigger, they will be trapped.
The player can not get out of the trap.
If they die the trap will hide once again and be ready for the next victim.
One more thing I should have done is add a series of explosions after a few seconds.
If you want to do that here's another tutorial I did.
A few shots of the effects in-game:
There’s a lot more you can do, I hope I’ve stimulated your imagination.
The example used in this tutorial.
If you need further help please contact us on the forums.
catagories: tutorial, mapping, buildings, sdknuts
Comment on this Article:You must login to post comments.