Portal - Tutorial - Energy Ball Launcher and Catcher

From Valve Developer Community
Jump to: navigation, search
English (en)Русский (ru)Translate (Translate)
Portal Level Creation
Skill Level

This tutorial expects you to have this amount of knowledge within the topic to follow along smoothly.

Novice Familiar Competent Proficient Expert


Introduction

This page will show you how to create Energy Ball Launchers and Catchers.

Launcher

Launcher Base

Concrete Slab

Create a 8w*128l*128h brush with the nodraw texture. Tie this brush to a func_detail. Texture the front face with concrete/concrete_modular_wall001a and the border faces with signage/hazard_orange_03b. Rotate the textures if they aren't aligned.

Note.pngNote:The base isn't needed if your launcher is on a metal wall

Launcher Model

Launcher Model

Create a prop_dynamic entity and enter the following properties:

Property Name Value
Name ball_spawner_prop
World Model models/props/combine_ball_launcher.mdl

Launcher Lighting

Launcher Light Entity

Create a light entity and enter the following properties:

Property Name Value
Brightness 218 76 26 30
BrightnessHDR 218 76 26 30

Place the light inside the Launcher Model.

Launcher Clipping

Launcher Clip Brush

Create a 32w*64l*64h brush with the playerclip texture. Position this brush in front of the Launcher Base.

Launcher noportal

Launcher noportal volume

Create a 8w*96l*96h brush with the invisible texture.

Note.pngNote:The noportal brush isn't needed if your launcher is on a metal wall

Launcher Collision

Launcher Collision

Create a 1w*16l*16h brush with the nodraw texture. Position this brush in the front in the model. Tie this brush to a func_detail.

Launcher Spawner

Launcher Spawner

Create a point_energy_ball_launcher entity and position the entity right in front of the Collision Brush, touching the outer face.

Enter the following properties:

Property Name Value
Name energy_ball_launcher
Ball count 1
Min ball speed 200
Max ball speed 200
Ball radius 12.0
Ball Respawn Time 2.0
Note.pngNote: The Min ball speed and Max ball speed values can be changed, but make sure they are the same value. The minimum value to enter is 200 and the max is 400.

Sometimes under flags, the launcher starts inactive and gets activated when you touch a trigger.

Enter the following output:

  My Output Target Entity Target Input Parameter Delay Only Once
Io21.png OnPostSpawnBall ball_spawner_prop SetAnimation close 0.00 No

Ball Catcher

Note.pngNote:Ball Catchers are modified ball catchers from Half-Life 2: Episode One.

Catcher Base

Catcher Base

Create 2 8w*40l*128h brushes with the nodraw texture.

Create 2 8w*48l*40h brushes with the nodraw texture.

Texture the front faces with concrete/concrete_modular_wall001a and the outer edge faces with signage/hazard_orange_03b. Rotate the textures if they aren't aligned.

Create an 8w*48l*48h brush with the playerclip texture and put the brush inside of the concrete base so the player can't fall through.

Note.pngNote:The base isn't needed if your catcher is on a metal wall

Catcher Interior

Catcher Interior

Create 2 16w*16l*48h brushes with the nodraw texture.

Create 2 16w*48l*16h brushes with the nodraw texture.

Create a 16w*48l*48h brush with the nodraw texture.

Put these brushes behind the Catcher Base.

Catcher Model

Catcher Model

Create a prop_dynamic entity and enter the following properties:

Property Name Value
World Model models/props/combine_ball_catcher.mdl
Disable Shadows Yes
Name ball_trap_1_housing

Catcher Sprites

Catcher Sprites

Create an env_sprite entity and enter the following properties:

Property Name Value
Name ball_trap_1_sprite
Parent ball_trap_1_housing
Render FX Distort
Render Mode Additive
Framerate 30
Sprite Name materials/sprites/physring1.vmt
Scale 1.5
Size of Glow Proxy Geometry 0

Create another env_sprite entity and enter the following properties:

Property Name Value
Name ball_trap_1_sprite
Parent ball_trap_1_housing
Render FX Distort
Render Mode World Space Glow
Framerate 30
Sprite Name materials/sprites/glow01.vmt
Scale 2
Size of Glow Proxy Geometry 0

Catcher Ball

Ball Model

Create a prop_dynamic entity and enter the following properties:

Property Name Value
Parent ball_trap_1_housing
World Model models/Effects/combineball.mdl
Name ball_trap_1_ball
Start Disabled Yes

Catcher Spotlight

Catcher Spotlight

Create a point_spotlight entity and enter the following properties:

Property Name Value
Name spotlight1
Color 218 76 26
Spotlight Length 256
Spotlight Width 32
HDR color scale 2.0

Catcher Filter

Ball Filter

Create a filter_combineball_type entity and enter the following properties:

Property Name Value
Parent ball_trap_1_housing
Name filter_combine_ballpermit_alt
Ball Type Launched by point_combine_ball_launcher

Catcher Sounds

Catcher Sound

Create an ambient_generic entity and enter the following properties:

Property Name Value
Name sound_activate
Sound Name AlyxEMP.Charge

Catcher Setup

Catcher Sound

Create a logic_relay entity and enter the following property:

Property Name Value
Name relay_ball_trap_1_setup

Enter the following outputs: Enter the following output:

  My Output Target Entity Target Input Parameter Delay Only Once
Io21.png OnSpawn ball_trap_1_ball SetParentAttachment ball_attachment 0.00 No
Io21.png OnSpawn ball_trap_1_sprite SetParentAttachment ball_attachment 0.00 No

Catcher Trigger

Catcher Trigger

Create a 96w*96l*32h cylinder with 8 sides with the trigger texture

Use the Hammer Transform Dialog and set its Y rotation value to 90.

Position the brush inside of the catcher.

Tie this brush to a trigger_multiple entity and enter the following properties:

Property Name Value
Name ball_trap_1
Filter Name filter_combine_ballpermit_alt

Enter the following outputs:

  My Output Target Entity Target Input Parameter Delay Only Once
Io21.png OnTrigger !activator Kill <none> 0.00 No
Io21.png OnTrigger ball_trap_1_ball Enable <none> 0.00 No
Io21.png OnTrigger ball_trap_1_housing SetAnimation close 0.00 No
Io21.png OnTrigger ball_trap_1_housing SetAnimation closed 2.00 No
Io21.png OnTrigger ball_trap_1_sprite ShowSprite <none> 0.00 No
Io21.png OnTrigger energy_ball_launcher Disable <none> 0.00 No
Io21.png OnTrigger sound_activate PlaySound <none> 0.00 No
Io21.png OnTrigger spotlight1 LightOff <none> 0.00 No

Under Flags, modify the following:

Flag
Checkbox-off.png Clients
Checkbox-on.png Physics Objects

Implementation

You should have the same amount of launchers as catchers. If you have multiple catchers and launchers, remember to change the energy_ball_launcher in the trigger's outputs.

See also