Creating Portal Piston Types

From Valve Developer Community
Jump to: navigation, search


Portal Behind The Scenes Level Creation

Introduction

This guide will show you how to create various piston types.


Warning: Warning this page is work in progress and is unfinished. However, you can still follow of what has been finished so far.

Fast Piston

Note:Fast Pistons are usually attached to a wall instead of a ceiling or a floor.

Piston Base

Create a prop_static entity and set it's world model to models/props_bts/horizontal_piston_base.mdl.


World Model

Create a prop_dynamic entity and enter the following:

Property Name Value
Name crusher1
Parent move_crusher1
Disable Shadows Yes
World Model models/props_bts/horizontal_piston_body.mdl

Align this model with the piston base prop and put it at the beginning of the static prop model as if it's about to push out.

Moving the piston

Create a 128w*512l*64h rectangle with the invisible texture in the middle of the prop_dynamic , tie it to a func_movelinear entity and do the following:

Property Name Value
Name move_crusher1
Move Direction Depends on your circumstance
Speed 200
Move Distance (This option is up to you)
Block Damage 100
Sound played when the brush starts moving. Doors.Move10
Sound played when the brush stops moving. Doors.FullClose10

Add the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io13.png OnFullyClosed !self Open <none> 2.00 No
Io13.png OnFullyOpen !self Close <none> 2.00 No
Io12.png OnFullyOpen shake_crusher1 Close <none> 2.00 No

Shake

Put an env_shake entity near where the piston hits the wall then enter the following guides

Property Name Value
Name shake_crusher1
Effect Radius 640
Frequency 100

Details

Using the Clipping Tool

Create a 4w*144l*112h brush with nodraw and make it a func_detail. Use the clipping tool to cut the corners.

Put the metalwall_bts_004a texture on the sides you can see.

Put an info_overlay and set it's texture to stain_oil_01

Give it a length of 160 units with texture lock on.

Position the overlay just like this

Position the info_overlay just like you see on the image.










End Result and Implementation

Your piston should look something like this at the end.

End Result

To make this crusher start moving, fire the open output on move_crusher1. Then the crusher will repeat it's thing.




Large Piston

Piston Base

Create a prop_static entity and set it's world model to models/props_bts/vertical_large_piston_base.mdl

Disable the Shadows.

World Model

Create a prop_dynamic entity and enter the following:

Property Name Value
Name crusher1
Parent move_crusher1
Disable Shadows Yes
World Model models/props_bts/vertical_large_piston_body.mdl


Note: Position the top part of this model to the top part of the base model. Just like it's low and about to rise up.

Proper Collision

Create a 152w*152l*896h cylinder with 16 sides with the playerclip texture. Tie it to a func_brush

Center this brush exactly with the piston model.

Enter the following properties:

Property Name Value
Parent move_crusher1

Moving the piston

Create a 32w*32l*512h rectangle with the invisible texture in the middle of the prop_dynamic , tie it to a func_movelinear entity and do the following:

Property Name Value
Name move_crusher1
Move Direction -90 0 0
Move Distance (This option is up to you)
Block Damage 25
Sound played when the brush starts moving. Metal_Box.Strain
Sound played when the brush stops moving. Portal.giant_piston

Enter the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io13.png OnFullyClosed !self Open <none> 2.00 No
Io13.png OnFullyOpen !self Close <none> 2.00 No

Implementation

Make an entity fire the open output move_crusher1 after it opens, the crusher will always be doing it's thing.

Smaller Pistons

The way to make this is pretty much the same as the big piston, just edit the properties of what you need on the move_crusher1.

Set the World Model of the prop_static to models/props_bts/vertical_small_piston_base.mdl

Set the World Model of the prop_dynamic to models/props_bts/vertical_small_piston_body.mdl

The cylinder size of the func_brush is 146w*146l*326h

Implementing is also the same thing.


To do: Add more piston types such as mini crushers seen in testchmb_a_15 and mini pistons seen in escape_00


See Also