Confiscation Field

From Valve Developer Community
Jump to: navigation, search

This tutorial will show how to create a fully functional confiscation field. A field that will supercharge the Gravity Gun into a much more powerful version of it. If the player also happens to be carrying any other weapons, the field will fizzle them before supercharging the Gravity Gun.

Entity Creation

Step 1

Step 1

Start off by creating a 512x256x256 room. Keep in mind however, that the room does not have to be this exact size, but the confiscation fields seen in Valve's maps are a similar size to the size of the room that will be created in this tutorial.

Step 2

Step 2

Create four 128x128 walls on opposite ends of the room. It is recommended that you have them at least 16 units off the ground. Create 4 prop_static entities, and set their World Model to models/props_combine/weaponstripper.mdl. Place them so that each hole has one of these prop_static's flush inside them. Make sure that the holes are sealed in the back as to prevent leaks.

Step 3

Step 3

Create 4 env_citadel_energy_core entities and place them at the base of each confiscation field emitter. Give them the following keyvalues.

Property Name Value
Name weaponstrip_emitterfx

Then go to the flag's tab and make sure the Start on flag is off and the No small particles flag is on.

Step 4

Step 4

Create 4 info_target entities and place them in the same place you placed the 4 env_citadel_energy_core's, at the base of each emitter. Give them the following keyvalues.

Property Name Value
Name weaponstrip_emitter

Step 5

Step 5

Create 4 env_spark entities in exactly the same place as the last two steps. Give them the following keyvalues.

Property Name Value
Name weaponstrip_emitterspark
Max Delay 2
Magnitude Medium

Make sure all flags are unticked.

Step 6

Step 6

Create 7 ambient_generic entities.

Name them as follows.

  1. ambient_weaponstrip_loop
  2. weaponstrip_sound_announce
  3. weaponstrip_sound_charge_start
  4. weaponstrip_sound_dissolve_start
  5. weaponstrip_sound_error
  6. weaponstrip_sound_security
  7. weaponstrip_sound_charge_loop

Step 7

Add the following key values.

ambient_weaponstrip_loop

Property Name Value
Name ambient_weaponstrip_loop
Sound Name d3_citadel.zapper
Start Volume 10
Start Pitch 50

On flags, tick Play Everywhere and Start Silent and untick Is NOT Looped.


weaponstrip_sound_announce

Property Name Value
Name weaponstrip_sound_announce
Sound Name citadel.overwatch_weaponstrip

On flags, tick all.


weaponstrip_sound_charge_start

Property Name Value
Name weaponstrip_sound_charge_start
Sound Name d3_citadel.weapon_zapper_start

On flags, tick Play Everywhere and Start Silent and untick Is NOT Looped.


weaponstrip_sound_dissolve_start

Property Name Value
Name weaponstrip_sound_dissolve_start
Sound Name d3_citadel.weapon_zapper_charge_node

On flags, tick Play Everywhere and Start Silent and untick Is NOT Looped.


weaponstrip_sound_error

Property Name Value
Name weaponstrip_sound_error
Sound Name citadel.overwatch_weaponstrip_fail

On flags, tick all.


weaponstrip_sound_security

Property Name Value
Name weaponstrip_sound_security
Sound Name citadel.overwatch_weaponstrip_fail_security

On flags, tick all.


weaponstrip_sound_charge_loop

Property Name Value
Name weaponstrip_sound_charge_loop
Sound Name d3_citadel.weapon_zapper_ambient_loop

On flags, tick Play Everywhere and Start Silent and untick Is NOT Looped.

Step 8

Step 8

Create 4 light entities. Place them at the emitters 8 units away from the info_target entities. Give them the following key values.

Property Name Value
Name weaponstrip_emitterlight
Brightness 225 241 255 250
Appearance 33
Custom Appearance mmnmmommommnonmmonqnmmo

Make sure the flag Initially Dark is ticked.

Step 9

Step 9

Create 4 trigger brush entities. Make them the size of the room. Make the first 2 brush entities a trigger_vphysics_motion, make the third one a trigger_weapon_dissolve and make the fourth one a trigger_weapon_strip.

Give them the following keyvalues

trigger_vphysics_motion 1

Property Name Value
Name weaponstrip_motion_disable_player
Start Disabled Yes
Filter Name filter_weapon_strip_player
Scale gravity of objects in the field. 2
Max velocity in field 8
Max amount to reduce velocity 0
Velocity scale/drag 0
Angular Velocity scale/drag 0
Linear force 0

On flags, make sure only Clients is ticked.


trigger_vphysics_motion 2

Property Name Value
Name weaponstrip_motion_disable
Start Disabled Yes
Filter Name filter_weapon_strip_weapons
Scale gravity of objects in the field. 0.0
Additional air density for drag 0.5
Max velocity in field 2
Max amount to reduce velocity 32

On flags, make sure only Physics Objects and Everything is ticked.

trigger_weapon_dissolve

Property Name Value
Name weapon_dissolve
Start Disabled Yes
Filter Name filter_weapon_strip_weapons
Emitter Name weaponstrip_emitter

On flags, make sure only Physics Objects and Everything is ticked.

trigger_weapon_strip

Property Name Value
Name weapon_strip
Start Disabled Yes

On flags, make sure only Clients is ticked.

Step 10

Step 10

Create a game_ragdoll_manager and a game_weapon_manager. Give them these keyvalues.

game_ragdoll_manager

Property Name Value
Max Ragdoll Count 5

game_weapon_manager

Property Name Value
Weapon Classname weapon*
Max Allowed in Level 4

Step 11

Step 11

Create a filter_activator_name and a filter_activator_class. Give them these keyvalues.

filter_activator_name

Property Name Value
Name filter_weapon_strip_player
Filter Name !player

filter_activator_class

Property Name Value
Name filter_weapon_strip_weapons
Filter Classname weapon_*

Step 12

Step 12

Create 8 logic_relay entities. Give them the following keyvalues.

logic_relay 1

Property Name Value
Name logic_room0_start_scan


logic_relay 2

Property Name Value
Name logic_room0_end_scan


logic_relay 3

Property Name Value
Name strip_stop


logic_relay 4

Property Name Value
Name logic_weapon_strip_announce


logic_relay 5

Property Name Value
Name logic_weapon_strip_strip


logic_relay 6

Property Name Value
Name logic_weapon_strip_dissolve


logic_relay 7

Property Name Value
Name logic_weapon_strip_physcannon_start


logic_relay 8

Property Name Value
Name logic_weapon_strip_physcannon_end


I/O Creation

Add the following outputs to the following entities.

weapon_dissolve

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnChargingPhyscannon logic_weapon_strip_physcannon_start Trigger <none> 0.00 No


logic_room0_start_scan

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weaponstrip_motion_disable_player Enable <none> 0.00 No
Io11.png OnTrigger logic_weapon_strip_announce Trigger <none> 2.00 No


strip_stop

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weaponstrip_emitterfx Stop 4 0.00 No
Io11.png OnTrigger weaponstrip_emitterlight TurnOff <none> 0.00 No
Io11.png OnTrigger weapon_strip Disable <none> 0.00 No
Io11.png OnTrigger strip_stop Trigger <none> 0.00 No
Io11.png OnTrigger weaponstrip_emitterspark StartSpark <none> 0.00 No
Io11.png OnTrigger ambient_weaponstrip_loop StopSound <none> 0.00 No
Io11.png OnTrigger logic_room0_end_scan Trigger <none> 2.00 No


logic_weapon_strip_announce

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weaponstrip_sound_announce PlaySound <none> 0.00 No
Io11.png OnTrigger logic_weapon_strip_strip Trigger <none> 5.00 No


logic_weapon_strip_strip

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weaponstrip_emitterfx StartCharge 4.0 0.00 No
Io11.png OnTrigger weaponstrip_motion_disable Enable <none> 0.00 No
Io11.png OnTrigger weaponstrip_sound_charge_start PlaySound <none> 0.00 No
Io11.png OnTrigger weaponstrip_sound_charge_loop PlaySound <none> 0.00 No
Io11.png OnTrigger weapon_strip Enable <none> 4.00 No
Io11.png OnTrigger logic_weapon_strip_dissolve Trigger <none> 6.00 No
Io11.png OnTrigger weaponstrip_emitterlight TurnOn <none> 6.00 No


logic_weapon_strip_dissolve

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weapon_dissolve Enable <none> 0.00 No
Io11.png OnTrigger weaponstrip_sound_dissolve_start PlaySound <none> 0.00 No


logic_weapon_strip_physcannon_start

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weaponstrip_emitterspark StartSpark <none> 0.00 No
Io11.png OnTrigger weaponstrip_sound_error PlaySound <none> 1.00 No
Io11.png OnTrigger logic_weapon_strip_physcannon_end Trigger <none> 4.00 No


logic_weapon_strip_physcannon_end

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger weapon_dissolve Disable <none> 0.00 No
Io11.png OnTrigger weapon_strip Disable <none> 0.00 No
Io11.png OnTrigger weaponstrip_motion_disable Disable <none> 0.00 No
Io11.png OnTrigger weaponstrip_sound_charge_loop StopSound <none> 0.00 No
Io11.png OnTrigger weapon_dissolve StopSound <none> 0.00 No
Io11.png OnTrigger strip_stop Trigger <none> 1.00 No
Io11.png OnTrigger weaponstrip_motion_disable_player Disable <none> 1.00 No
Io11.png OnTrigger weaponstrip_sound_security PlaySound <none> 4.00 No


Once that is set up, to simply start the confiscation field, set up a trigger_once to trigger the logic_room0_start_scan relay. As a bonus, you can also add Outputs to logic_room0_start_scan and logic_room0_end_scan to enable and disable Combine Shield Walls respectively.

See also

External Links

  • [1] Example VMF that was made in this tutorial.