Difference between revisions of "Portal 2 vote page"

From Valve Developer Community
Jump to: navigation, search
Line 2: Line 2:
  
 
==With buttons==
 
==With buttons==
#Place a [[prop_button]], using the entity tool.
+
#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:
+
#Place a [[func_instance]], using an '''entity tool''' aswell and go to its '''properties'''. Do the following changes:
 
{| class=standard-table
 
{| class=standard-table
 
!  Property || Value
 
!  Property || Value
Line 11: Line 11:
 
| 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:
+
3. In prop_button's properties, go to '''Outputs''' tab and Add the following:
 
{| class=standard-table
 
{| class=standard-table
 
!  My Output || Target Entity || Target Input || Delay || Only Once
 
!  My Output || Target Entity || Target Input || Delay || Only Once
Line 21: Line 21:
  
 
==With triggers==
 
==With triggers==
#Make a block with the block tool and press Ctrl+T (while you have it selected). Make it [[trigger_once]].
+
#'''Make a block''' with the block tool and press '''Ctrl+T''' (while you have it selected). Make it [[trigger_once]].
 
# Repeat step 2
 
# Repeat step 2
# Repeat step 3 but with the only change of "OnPressed" to "OnStartTouch"
+
# Repeat step 3 but with the only change of '''"OnPressed"''' to '''"OnStartTouch"'''

Revision as of 20:05, 20 March 2013

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.

With buttons

  1. Place a prop_button, using the entity tool.
  2. Place a func_instance, using an entity tool aswell and go to its properties. Do the following changes:
Property Value
Fix Up Name Vote_screen
VMF Filename instances/p2editor/global_pti_ents.vmf

3. In prop_button's properties, go to Outputs tab and Add the following:

My Output Target Entity Target Input Delay Only Once
OnPressed Vote_screen instance:@relay_pti_level_end;Trigger 0.00 Yes
If you want to make it a floor button, then just put a prop_floor_button instead of prop_button

With triggers

  1. Make a block with the block tool and press Ctrl+T (while you have it selected). Make it trigger_once.
  2. Repeat step 2
  3. Repeat step 3 but with the only change of "OnPressed" to "OnStartTouch"