Sparking Rope Tutorial

Tutorial collection, comprehensive listings on main site.

Sparking Rope Tutorial

Postby Tutorial on Tue Jan 01, 2008 8:15 pm

category
General Half-Life 2/Effects

description
Add a spark on to the end of a moving rope.

keywords
spark, rope, env_rope, env_spark.

First thing, set up your map.

The entity we need first, is a move_rope. This will be the upper end of the rope.
Name it rope1 (or similar) and set
Next KeyFrame to rope2. Choose Subdivision values as you like, you might leave them at the default.

The next entity is the keyframe_rope, the ending point of the rope.
It is called rope2, so that it completes the rope that started with the move_rope. Don't forget to set
Parent: box

Next, make a little brush, about 16x16x16 and center it onto the keyframe_rope. Texture it with the nodraw texture, and click ctrl + t to make it a func_physbox, adjusting these values:

Name: box
Disable Shadows: Yes
Material Type: Metal
Mass Scale: 1
Not Solid to world: Passes through world


Check these flags:
Ignore +USE for Pickup
Not affected by rotorwash
Don't take physics damage
Don't allow bullet penetration


Now we make the box hang on the rope.
Create a logic_measure_movement, and add:

Entity to measure: box
Measure Reference: rope1
Entity to move: rope2
Movement Reference: rope1


Place the logic_measure_movement about 2/3 up the rope.
The next thing we need is a phys_lengthconstraint.
Place it right onto the keyframe_rope and the func_physbox.

Adjust these values:
Entity 1: box
Additional length: 20.


Uncheck the "No collision until break" flag.

Then make sure to have "Toggle helpers" switched on (The sphere in Hammer's toolbar) and drag the little white circle up, about 1/2 of the rope.

Image

Then we create an env_spark, which also sits in the very middle of the box and the keyframe_rope.

Give it these values:
Name: sparks
Parent: box


You can adjust Magnitude and Spark Trail Length as you wish.

This is how it should look like:
Image

Now, we are going to make it move around.

Build a env_physexplosion and add these values:
Name: explosion
Magnitude: 400
Clamp Radius: 64
Limit to Entity: box


Check only the "No damage - Only Force" flag.
Drag the explosion into the near vincinity to the func_physbox.

Now we are almost done:
Create an ambient_generic.
Name: sound
Sound Name: Breakable.Spark


Flags:
Start Silent
Is not Looped


The next and final step is triggering all these things: Make a logic_auto and a logic_timer.

For the logic_auto, we set these values:
Outputs: On Map Spawn - timer - Enable - 0 - no


For the logic_timer:
Name: timer
Start disabled: Yes
Use Random Time: Yes
Minimum Random Interval: 1
Maximum Random Interval: 3


Outputs:
OnTimer - explosion - Explode - 0 - No
OnTimer - sound - PlaySound - 0 - No


And that wraps it up! Now it should look like this:
Image

Have fun!

-Dogfish
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby vcool on Tue Jan 01, 2008 8:18 pm

It got finally posted :D
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Postby heeyo on Thu Jan 03, 2008 1:57 pm

Ah I see what this does now. So whenever it sparks, the physexplosion makes the rope jolt about a little, right?
heeyo
Just Joined
Just Joined
 
Joined: Thu Jan 03, 2008 1:34 pm
Location: Stoke-on-Trent, England

Re: Sparking Rope Tutorial

Postby NinjaAlex on Sat May 22, 2010 2:24 pm

Nice tutorial :). One thing I did have to add though is setting the env_spark to start on in flags, but other than that it worked like a charm. Nice one!
NinjaAlex
Dumpling
Dumpling
 
Joined: Wed Jan 28, 2009 5:13 am
Location: England, United Kingdom

Re: Sparking Rope Tutorial

Postby DrAddicted on Sat Mar 23, 2013 9:44 am

At first thanks for this great tutorial!
It let me make a secret room with supplies and a killable Trigger_hurt in front of the door.

And now my 2 Cents:

You could also add the sparks in the timer: OnTimer - Sparks - ToggleSpark - 0 - No
It's adding a great effect. :)
DrAddicted
Member
Member
 
Joined: Wed Jan 23, 2013 9:22 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users