Orb Launcher Tutorial
From ThinkingWithPortals
A tutorial by espen180 on how to create a fully functioning Orb Launcher, as seen in Portal.
Contents |
Info
You'd think this mechanism could be compiled into one entity, like an invulnerable NPC. Unfortunately, this is not the case, and to make one, we need to spawn several different entities and set then up to form the finished Orb Launcher.
The Entities
Here are the required entities which are needed to make the Orb Launcher
prop_dynamic
The base of the Orb Launcher. The rest on the entities will be placed based on the position and angle of this object.
To find the launcher model, browse through your models and find 'combine_ball_launcher.mdl'.
point_energy_ball_launcher
The entity that shoots out the orb that we see in the game.
logic_relay
This entity will hold the orb creation process. We are using a logic_relay for simplicity.
logic_auto
This entity will make sure that the process is started at the beginning of the map.
logic_timer
This entity will make sure that the process is restarted at the correct time.
func_wall_toggle
This entity will make sure the orb collides with the prop_dynamic.
The Entity Placements
- Place the prop_dynamic where you want it to be in the map.
- Place the point_energy_ball_launcher in front of the launcher model's 'arms', where they produce a sphere shape.
- Make sure the angles of the point_energy_ball_launcher match those of the prop_dynamic, or else the orb will not fly the direction you want it to.
- The func_wall_toggle should be covered in the dev/tools/invisible texture, be 16x16x1 units.
- Place the func_wall_toggle over the 'sphere' produced by the launcher model's arms.
- The location of the logic_ entities does not matter, but they should be placed near the prop_dynamic for easy access.
Look at the picture on the right for guidance.
The I/O Setup
This Section will consist of pictures with commentary written beside each image.
To simplify things, I have named every entity their entity class. Example: The prop_dynamic will be called prop_dynamic
Prop_dynamic
All the prop_dynamic has to do is make sure it is always playing the idle_closed animation.
Point_energy_ball_launcher
This entity has no outputs.
Other Info: This tutorial does not support lifetime refresh. Therefore, leave that field on 0.
logic_auto
The logic_auto makes sure the process is active when the map starts.
Other Info:
All outputs are named 'OnMapSpawn'.
logic_relay
The logic_relay stores the orb launching process. It fires all entities at the right times.
logic_timer
The logic_timer restarts the process every x seconds.
Other Info:
The amount of seconds to count should be 1 second longer than the lifetime of the orb.
func_wall_toggle
This entity has no outputs.
The func_wall_toggle makes sure the orb collides with the 'nose' of the orb launcher model.
