WiseElec: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Removed "--")
Line 30: Line 30:


<h2> Credits </h2>
<h2> Credits </h2>
The tutorial is is originally created by --[[User:Mark WiseCarver|wisemx]], it is ported from sdknuts.net/wiseElec to the VDC by --[[User:Plykkegaard|Peter [AGHL]]] 05:55, 9 Feb 2008 (PST)
The tutorial is is originally created by [[User:Mark WiseCarver|wisemx]], it is ported from sdknuts.net/wiseElec to the VDC by [[User:Plykkegaard|Peter [AGHL]]] 05:55, 9 Feb 2008 (PST)

Revision as of 15:25, 9 February 2008

Electrified obstacles

insert caption

For this tutorial I could have used just about anything for our electrified obstacle but picked this small railing because the player can jump over it once the electricity is turned off. Of course we could apply this same method to a ladder, door/gate or even water/ground.

In this example the railing is initially electrified but can be disabled by standing on the small Red carpet. Standing on the small Green carpet will re-enable the electricity. (The carpets are not shown here)

When a player "touches" the fence while it is electrified there will be sparks, smoke and sounds plus the player will get blown back a few feet.

The trigger_hurt used in this tutorial starts off a series of events when the player touches it.

  • Load the example file to see each of the entities mentioned here.

Once the player touches the trigger_hurt these entities are excited to get going via outputs: One physexplosion, eight env_spark’s, one trigger_push and one logic_timer, to lend some logic.

For the On and Off switch, if one would be needed, I’ve used two trigger_multiple’s and placed them over the red and green carpets. You could easily create a switch for this, another kind of "secret" trigger or the lever like Valve used in Ravenholm.

insert caption

I’ve used a prop_static for the railing/electrified object but you could just as easily use motion enabled entity types. Imagine a gate that would swing open once the electricity was turned off, or even a loose cable trapped under a vehicle.

I don’t think you need a step by step on creating this.

Wrap up

There’s a lot more you can do, hopefully this article have stimulated your imagination.

Credits

The tutorial is is originally created by wisemx, it is ported from sdknuts.net/wiseElec to the VDC by Peter [AGHL] 05:55, 9 Feb 2008 (PST)