Conveyor (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (WIP - Implementing Moth's work to this page. Thank you for your contribution, Moth!)
(Finished moving tutorial. This may need revisions here and there, I'm not a tutorial expert.)
Line 1: Line 1:
{{wip}}
== Introduction ==
To create the Portal 2 conveyor system, a series of [[func_tracktrain|func_tracktrains]] must be created, each with their own [[path_track]] destination, linked in a series, with the first one with the ''Teleport TO this'' option checked to make a loop from the first to last path.


To create a conveyor belt you first need to create a brush. Then tie this to a func_conveyor.
Parent each of these [[func_tracktrain|func_tracktrains]] to a [[prop_dynamic]] model ''props_factory/conveyor_belt_module.mdl'' which will follow the paths.


Set the conveyor speed and move direction in the Class Info.
== Creating the Conveyor Track ==
{{note|For the purpose of this tutorial, a short conveyor of four sections will be created. Duplicate more sections for a longer conveyor, and less for a shorter one.}}
1. Create a [[prop_static]] with the model name ''props_factory/conveyor_belt.mdl''


There are two conveyor belt textures (search conveyor in the texture menu).
2. Duplicate it and line up four of them. This will make the conveyor track:
These textures should be stretched when they are used from 0.25 to about 2.00 along the movement direction.


Please update to include texture animation without using custom textures, should be possible.(?)
[[Image:ConveyorPortal2_1.png|400px|thumb|left]]{{clr}}


== Creating the Conveyor Belt ==
3. Create a [[prop_dynamic]] entity with the the model name ''props_factory/conveyor_belt_module.mdl''


4. Align its origin with the origin of the prop_static base we made in step 1:


[[Image:ConveyorPortal2_2.png|400px|thumb|left|Make sure the conveyor belt is floating at least 8 units above the base]]{{clr}}


== Moving the Belt ==
5. Create a small 20x24x16 rectangular brush and texture it with [[Tool_textures#nodraw|nodraw]]. Place it underneath the conveyor belts it just occupies the space between the models:


[[Image:ConveyorPortal2_3.png|400px|thumb|left]]{{clr}}


A more advanced version of the conveyor belt can be found at the following link (1), along with a tutorial:
6. Select the conveyor belt and the rectangular brush together, and copy-paste to duplicate and place one on each conveyor base origin.T


[http://forums.thinkingwithportals.com/community-releases/advanced-conveyor-belt-portal2-t4802.html]
[[Image:ConveyorPortal2_4.png|400px|thumb|left|In this tutorial, seven sections are needed.]]{{clr}}
 
7. To make this next process easier, hide everything except the first conveyor belt and rectangular nodraw brush (Hammer shortcuts: {{key|H}} = Hide Selected, {{key|U}} = Show All Hidden)
 
8. Create a [[path_track]] entity and place it '''inside''' the nodraw box so that the two share an origin:
[[Image:ConveyorPortal2_5a.png|400px|thumb|left]]{{clr}}
[[Image:ConveyorPortal2_6.png|400px|thumb|left|As mentioned earlier, there are seven sections, so there should be seven of these nodraw/path sets]]{{clr}}
 
{{note|All further steps will be performed with models hidden and focus will be directed only on these sets of nodraw and path_tracks.}}
 
9. Make each nodraw box a [[func_tracktrain]] entity. Give each entity an individual name. In this tutorial, the naming convention will be conveyor_mover01 to conveyor_mover07. Each entity will have the following properties:
:Max Speed: 60
:Initial Speed: 60
:Change Angles: Never
 
:conveyor_mover01 'First stop target' is 'conveyor_path01'
:conveyor_mover02 'First stop target' is 'conveyor_path02'
:conveyor_mover03 'First stop target' is 'conveyor_path03'
 
Repeat this for each func_tracktrain entity.
 
10. Deselect and hide the nodraw func_tracktrain entities, leaving the path_tracks visible. Give each path_track a unique name similar to step 9 above. For this tutorial, they will be named conveyor_path01 to conveyor_path07
 
11. For each path_track, set 'Next stop target' to the next path in the track, so conveyor_path01 has a 'next stop' setting of 'conveyor_path02' and so on. The last path should point back to the first one, so conveyor_path07 target is conveyor_path01.
 
[[Image:ConveyorPortal2_7.png|400px|thumb|left|This screenshot shows the linked path_tracks with orange lines between them, sharing origins with nodraw tracktrains. Each tracktrain has its own path_track, and each has a unique name.]]{{clr}}
 
== Finishing Up ==
12. Select the first path_track (conveyor_path01) and set the flag 'Teleport TO this path_track':
[[Image:ConveyorPortal2_8.png|400px|thumb|left|This ensures that when the trains reach the last path (conveyor_path07) they will immediately teleport straight to the beginning again.]]{{clr}}
 
13. Finally, parent each conveyor belt dynamic prop to the tracktrains.
 
== Notes ==
* Entities can be spawned at one end of the conveyor using an [[env_entity_maker]] entity to spawn a template, which is carried along the belt and destroyed with a trigger, or dropped into a pit.
== External links ==
* Original tutorial by {{user|Moth}}: [http://forums.thinkingwithportals.com/community-releases/advanced-conveyor-belt-portal2-t4802.html]
[[Category:Portal 2]]
[[Category:Portal 2 Level Design]]

Revision as of 22:06, 11 October 2011

Introduction

To create the Portal 2 conveyor system, a series of func_tracktrains must be created, each with their own path_track destination, linked in a series, with the first one with the Teleport TO this option checked to make a loop from the first to last path.

Parent each of these func_tracktrains to a prop_dynamic model props_factory/conveyor_belt_module.mdl which will follow the paths.

Creating the Conveyor Track

Note.pngNote:For the purpose of this tutorial, a short conveyor of four sections will be created. Duplicate more sections for a longer conveyor, and less for a shorter one.

1. Create a prop_static with the model name props_factory/conveyor_belt.mdl

2. Duplicate it and line up four of them. This will make the conveyor track:

ConveyorPortal2 1.png

Creating the Conveyor Belt

3. Create a prop_dynamic entity with the the model name props_factory/conveyor_belt_module.mdl

4. Align its origin with the origin of the prop_static base we made in step 1:

Make sure the conveyor belt is floating at least 8 units above the base

Moving the Belt

5. Create a small 20x24x16 rectangular brush and texture it with nodraw. Place it underneath the conveyor belts it just occupies the space between the models:

ConveyorPortal2 3.png

6. Select the conveyor belt and the rectangular brush together, and copy-paste to duplicate and place one on each conveyor base origin.T

In this tutorial, seven sections are needed.

7. To make this next process easier, hide everything except the first conveyor belt and rectangular nodraw brush (Hammer shortcuts: H = Hide Selected, U = Show All Hidden)

8. Create a path_track entity and place it inside the nodraw box so that the two share an origin:

ConveyorPortal2 5a.png
As mentioned earlier, there are seven sections, so there should be seven of these nodraw/path sets
Note.pngNote:All further steps will be performed with models hidden and focus will be directed only on these sets of nodraw and path_tracks.

9. Make each nodraw box a func_tracktrain entity. Give each entity an individual name. In this tutorial, the naming convention will be conveyor_mover01 to conveyor_mover07. Each entity will have the following properties:

Max Speed: 60
Initial Speed: 60
Change Angles: Never
conveyor_mover01 'First stop target' is 'conveyor_path01'
conveyor_mover02 'First stop target' is 'conveyor_path02'
conveyor_mover03 'First stop target' is 'conveyor_path03'

Repeat this for each func_tracktrain entity.

10. Deselect and hide the nodraw func_tracktrain entities, leaving the path_tracks visible. Give each path_track a unique name similar to step 9 above. For this tutorial, they will be named conveyor_path01 to conveyor_path07

11. For each path_track, set 'Next stop target' to the next path in the track, so conveyor_path01 has a 'next stop' setting of 'conveyor_path02' and so on. The last path should point back to the first one, so conveyor_path07 target is conveyor_path01.

This screenshot shows the linked path_tracks with orange lines between them, sharing origins with nodraw tracktrains. Each tracktrain has its own path_track, and each has a unique name.

Finishing Up

12. Select the first path_track (conveyor_path01) and set the flag 'Teleport TO this path_track':

This ensures that when the trains reach the last path (conveyor_path07) they will immediately teleport straight to the beginning again.

13. Finally, parent each conveyor belt dynamic prop to the tracktrains.

Notes

  • Entities can be spawned at one end of the conveyor using an env_entity_maker entity to spawn a template, which is carried along the belt and destroyed with a trigger, or dropped into a pit.

External links