Portal 2 vote page

From Valve Developer Community
Jump to: navigation, search

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.