Okay.. When i first saw the plug in HLČ i thought: hey, you must have that. And i think you want to have them also!
So here is the Tutorial.
I assume you already know how to make a map. So i directly start over.


Ingedients:
  • filter_activator_name
  • func_physbox
  • info_target
  • 2x keyframe_rope
  • phys_lengthconstraint
  • prop_dynamic
  • trigger_teleport
  • for some eyecandy:
  • prop_static



  • Let's start with the Eyecandy. I choosed a prop_static with props_lab/tpplugholder.mdl as world model.

    props/tpplugholder.mdl

    Then we're going to add one of the keyframe_rope entities. In this case i placed it on the first of the two plugs.
    Configure like this:
  • Name: plug_rope_1


  • keyframe_rope

    At next we're going to place our third plug. the one we can plug in.
    place the prop_dynamic near these plugs. then you need to configure it:

  • Parent: plug_physbox
  • World Model props_lab/tpplug.mdl
  • Name: plug_plug
  • Collisions: Not solid
  • Start Fade Dist: -1


  • at next we're placing the second keyframe_rope at the end of the plug. just like in the game. it also needs some configurations to work proper:

  • name: plug_rope_2
  • parent: plug_physbox
  • Next Keyframe: plug_rope_1
  • Slack: 25 (or whatever you want)


  • Now we have a plug connected through a wire with another plug. but how to move both?
    and what is that "plug_physbox"-entity?
    now the answer: make a black brush (tools/toolsblack; 1x5x5 units) and place it direct in front of our plug. dont make it too big.
    Tie it to an entity: func_physbox
    This is our main entity. So far i know it controlls almost everything you can do with the plug. So some settings are necessary:

  • Name: plug_physbox
  • Prop Data: Metal.Small
  • Material Type: Metal
  • RenderMode: Color
  • FX Amount: 0
  • Not solid to world: Solid to World


  • Now you should have something similar to this:

    our plug


    The black block we added in front will be, due to our settings, invisible ingame.

    Now to the next entity we're going to add: phys_lengthconstraint.
    This one will hold our plug together. place it near the plug and click on the little circle. Move it to the end where the keyframe_rope is.

    gluing the entities together

    Guess you know what's next. right. Setting up the phys_lengthconstraint:

  • Name: plug_constraint
  • Entity 1: plug_physbox


  • That was it! for now.
    you should have now a plug on a rope you can carry around.
    but how to put it into the plugholder? for that we need the three left entites: filter_activator_name, trigger_teleport and info_target
    Place the filter_activator_name somewhere in your map and set it up:
  • Name: plug_filter
  • Filter Mode: Allow entities that match criteria
  • Filter Name: plug_physbox


  • so far so good. this is to make sure that ONLY the func_physbox we attached to our plug can activate the teleporter.
    Let's place the last two entities:
    Place the teleporter-brush (1x10x10) a bit in the plugholder. i used the prop_dynamic plug to adjust it.
    then place the info_target at the end of the prop_dynamic (delete the prop_dynamic after setting up the teleporter!):

    placing the teleporter

    Now the last settings:
    prop_dynamic
  • Name: plug_dest


  • trigger_teleport
  • Name: plug_teleporter
  • Filter Name: plug_filter
  • Remote Destination: plug_dest

  • Now we're setting up the outputs. All are "OnEndTouch":
    Target Entity Target Input Delay
    plug_teleporter Disable 0.10
    plug_teleporter Enable 10.00
    plug_physbox DisableMotion 0.10
    plug_physbox ForceDrop 9.99
    plug_physbox EnableMotion 10



    This disables the teleporter when the plug is in (for 10 seconds here). after the time is up the plug gets thrown out.
    ~ finished ~


    Examplemap


    Questions? eMail or irc.gamesurge.net/mapping - © 2004 Puchi