Difference between revisions of "Portal 2 vote page"

From Valve Developer Community
Jump to: navigation, search
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
To make the vote screen appear, you will need to use either triggers or buttons (cube/ball/normal). In other words, you need something to activate it.
+
{{otherlang2
 +
|title=Portal 2 vote page
 +
|ru=Portal 2 vote page:ru
 +
}}
 +
The voting page/screen is a page where you evaluate the map/test chamber you had just played from workshop. There you can visit author's page, comment and rate the map/test chamber.
  
==With buttons==
+
To make the voting screen appear, you will need an entity to activate it. Generally this will be a trigger, but any entity that sends outputs can be used for this, such as a {{ent|prop_button}} or a {{ent|logic_relay}}.
#Place a [[prop_button]], using the entity tool.
+
 
#Place a [[func_instance]], using an entity tool aswell and go to its properties. Do the following changes:
+
==With triggers==
{| class=standard-table
+
 
 +
1. Create a trigger brush (using the tools/toolstrigger texture) with the block tool and tie it to a [[trigger_once]].<br>
 +
 
 +
2. Place a [[func_instance]] using the '''entity tool''', and go to its '''properties''' tab. Use the following settings:
 +
::{| class=standard-table
 
!  Property || Value
 
!  Property || Value
 
|-
 
|-
| Fix Up Name || Vote_screen
+
| Fix Up Name || pti_ents
 
|-
 
|-
 
| VMF Filename || instances/p2editor/global_pti_ents.vmf
 
| VMF Filename || instances/p2editor/global_pti_ents.vmf
 
|}
 
|}
3. In prop_button's properties, go to Outputs tab and Add the following:
+
 
{| class=standard-table
+
3. In the trigger's properties, go to the '''Outputs''' tab and add the following:
 +
::{| class=standard-table
 
!  My Output || Target Entity || Target Input || Delay || Only Once
 
!  My Output || Target Entity || Target Input || Delay || Only Once
 
|-
 
|-
| OnPressed || Vote_screen || instance:@relay_pti_level_end;Trigger || 0.00 || Yes
+
| OnStartTouch || @relay_pti_level_end || Trigger || 0.00 || Yes
 
|}
 
|}
 +
{{note|Hammer may indicate that the output is invalid. Ignore it, it will work fine in-game.}}
  
:If you want to make it a floor button, then just put a [[prop_floor_button]] instead of [[prop_button]]
+
Because most maps end with an elevator, placing this trigger somewhere in the exit elevator's shaft works well.  The Puzzlemaker exit elevator triggers the relay 0.90 seconds after the player enters the elevator, but you may wish to change this to stop the elevator door animation from being cut off. Placing another trigger further up the shaft works well for this.
  
==With triggers==
+
==With another entity==
#Make a block with the block tool and press Ctrl+T (while you have it selected). Make it [[trigger_once]].
+
 
# Repeat step 2
+
To trigger the vote screen using a different entity, repeat the steps above, but change <code>OnStartTouch</code> to an appropriate output for the entity, such as <code>OnTrigger</code> for a logic_relay or <code>OnPressed</code> for a button.
# Repeat step 3 but with the only change of "OnPressed" to "OnStartTouch"
+
 
 +
{{note|Ending a map with a button looks somewhat unprofessional, and should generally be avoided.}}
 +
 
 +
[[Category:Portal 2 Level Design]]
 +
[[Category:Portal 2 Tutorials]]

Latest revision as of 20:59, 26 April 2020

Русский

The voting page/screen is a page where you evaluate the map/test chamber you had just played from workshop. There you can visit author's page, comment and rate the map/test chamber.

To make the voting screen appear, you will need an entity to activate it. Generally this will be a trigger, but any entity that sends outputs can be used for this, such as a prop_button or a logic_relay.

With triggers

1. Create a trigger brush (using the tools/toolstrigger texture) with the block tool and tie it to a trigger_once.

2. Place a func_instance using the entity tool, and go to its properties tab. Use the following settings:

Property Value
Fix Up Name pti_ents
VMF Filename instances/p2editor/global_pti_ents.vmf

3. In the trigger's properties, go to the Outputs tab and add the following:

My Output Target Entity Target Input Delay Only Once
OnStartTouch @relay_pti_level_end Trigger 0.00 Yes
Note.png Note: Hammer may indicate that the output is invalid. Ignore it, it will work fine in-game.

Because most maps end with an elevator, placing this trigger somewhere in the exit elevator's shaft works well. The Puzzlemaker exit elevator triggers the relay 0.90 seconds after the player enters the elevator, but you may wish to change this to stop the elevator door animation from being cut off. Placing another trigger further up the shaft works well for this.

With another entity

To trigger the vote screen using a different entity, repeat the steps above, but change OnStartTouch to an appropriate output for the entity, such as OnTrigger for a logic_relay or OnPressed for a button.

Note.png Note: Ending a map with a button looks somewhat unprofessional, and should generally be avoided.