Creating An Auto Portal: Difference between revisions
No edit summary |
|||
Line 6: | Line 6: | ||
=== The Frame === | === The Frame === | ||
Create a <code>[[prop_static]]</code> entity and change it's world model to <code> models/props/autoportal_frame/autoportal_frame.mdl </code> | |||
[[Image:Autoportal_frame.PNG|thumb|right|400px|What the auto Portal Frame should look like.]] | [[Image:Autoportal_frame.PNG|thumb|right|400px|What the auto Portal Frame should look like.]] | ||
=== The Portal === | === The Portal === | ||
Create a <code>[[prop_portal]]</code> entity and name it <code> portal</code>. | |||
Set the Property "Start Activated" to Inactive. | Set the Property "Start Activated" to Inactive. | ||
Set the "Portal Number" property to which portal you are using. | Set the "Portal Number" property to which portal you are using. | ||
Line 17: | Line 17: | ||
Position the <code> prop_portal</code>2 units above the bottom of the portal frame (prop_static entity). Now center it based off the "bars" of the portal frame using the "top (x/y) view". | Position the <code>prop_portal</code>2 units above the bottom of the portal frame (prop_static entity). Now center it based off the "bars" of the portal frame using the "top (x/y) view". | ||
{{warning|If placed improperly, the portal will be inside the wall making the portal useless although the edges of the effects show.}} | {{warning|If placed improperly, the portal will be inside the wall making the portal useless although the edges of the effects show.}} | ||
Line 23: | Line 23: | ||
=== Portal Spawn Sound === | === Portal Spawn Sound === | ||
Create an <code>[[ambient_generic]]</code> entity and name it to <code> sound_portal_spawn</code> and enter the following properties: | |||
{| class=standard-table | |||
! Property Name || Value | |||
|- | |||
| Name || <code>sound_portal_spawn</code> | |||
|- | |||
| Sound Name || <code>Portal.open_blue</code> or <code>Portal.open_red</code> | |||
|- | |||
| Max Audible Distance || 333 | |||
|- | |||
| Source Entity Name || <code>portal</code> | |||
|} | |||
Go to flags have only "Is NOT Looped" checked | Go to flags have only "Is NOT Looped" checked | ||
=== Portal Spawn Shake === | === Portal Spawn Shake === | ||
Create an <code>[[env_shake]]</code> entity and name it to <code> shake_portal_spawn</code>. | |||
Put this entity fairly close to where the player triggers it if the player is near by the portal. There isn't a specific spot to put it at. | Put this entity fairly close to where the player triggers it if the player is near by the portal. There isn't a specific spot to put it at. | ||
Line 37: | Line 46: | ||
If you want to make this a prefab, I suggest following these steps to make things easier... | If you want to make this a prefab, I suggest following these steps to make things easier... | ||
Create a <code>[[logic_relay]]</code> and name it to <code> relay_portal_spawn </code> | |||
Add the outputs: | Add the outputs: | ||
Line 72: | Line 81: | ||
=== Make the Portal spawn === | === Make the Portal spawn === | ||
Make some entity trigger the <code> relay_portal_spawn</code> | Make some entity trigger the <code>relay_portal_spawn</code> | ||
For example with trigger_once: | For example with <code>[[trigger_once]]</code>: | ||
{| {{OutputsTable}} | {| {{OutputsTable}} | ||
Line 84: | Line 93: | ||
To make the portal close, you set the active state to 0, | To make the portal close, you set the active state to 0, | ||
here's in example with | here's in example with <code>trigger_once</code>: | ||
{| {{OutputsTable}} | {| {{OutputsTable}} |
Revision as of 13:07, 16 September 2019
This guide will show you how to create an auto portal, this is a very simple process and should be done in no time.
Auto Portal on the wall to walk through
The Frame
Create a prop_static
entity and change it's world model to models/props/autoportal_frame/autoportal_frame.mdl
The Portal
Create a prop_portal
entity and name it portal
.
Set the Property "Start Activated" to Inactive.
Set the "Portal Number" property to which portal you are using.

Position the prop_portal
2 units above the bottom of the portal frame (prop_static entity). Now center it based off the "bars" of the portal frame using the "top (x/y) view".

Portal Spawn Sound
Create an ambient_generic
entity and name it to sound_portal_spawn
and enter the following properties:
Property Name | Value |
---|---|
Name | sound_portal_spawn
|
Sound Name | Portal.open_blue or Portal.open_red
|
Max Audible Distance | 333 |
Source Entity Name | portal
|
Go to flags have only "Is NOT Looped" checked
Portal Spawn Shake
Create an env_shake
entity and name it to shake_portal_spawn
.
Put this entity fairly close to where the player triggers it if the player is near by the portal. There isn't a specific spot to put it at.
Optional (Recommended)
If you want to make this a prefab, I suggest following these steps to make things easier...
Create a logic_relay
and name it to relay_portal_spawn
Add the outputs:
Auto Portal for ceilings, floors, or Flinging
I highly suggest you read Auto Portal on the wall to walk through before you enter this part.
Aligning the portal
Do your best to perfectly center the portal with the auto-portal frame.

Rotating
Simply rotate the entire portal and make further corrections afterwards.

prop_portal
will make the portal look like it is in the same position in the hammer editor, you will have to rely on which direction the origin (yellow line in 2d view) is facingImplementation
Make the Portal spawn
Make some entity trigger the relay_portal_spawn
For example with trigger_once
:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | relay_portal_spawn | Trigger | 0.00 | No |
Make the Portal close
To make the portal close, you set the active state to 0,
here's in example with trigger_once
:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | portal | SetActivatedState | 0 | 0.00 | No |