This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Difference between revisions of "Half-Life: Alyx Workshop Tools/Level Design/Flashlight"

From Valve Developer Community
Jump to: navigation, search
(fixed ru-lang redirection)
m
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{otherlang2
+
<!-- Base -->
|es=
+
{{lang|Half-Life: Alyx Workshop Tools/Level Design/Flashlight}}
|ru=Инструменты_мастерской_Half-Life:_Alyx/Дизайн_уровней/Фонарик
+
{{shortpagetitle}}
}}
+
[[Category:Half-Life:_Alyx_Workshop_Tools]]
 +
[[Category:Half-Life:_Alyx_Workshop_Tools/Level Design]]
 +
[[Category:Half-Life:_Alyx_Workshop_Tools/Weapons]]
 +
{{HLATools topicons}}
 +
 
 +
<!-- Content -->
 
== Introduction ==
 
== Introduction ==
 
This tutorial will teach you how to use the flashlight in your map.
 
This tutorial will teach you how to use the flashlight in your map.
  
 
You will need:
 
You will need:
*A '''logic_playerproxy'''
+
*A '''[[logic_playerproxy]]'''
*An '''info_hlvr_equip_player'''
+
*An '''[[info_hlvr_equip_player]]'''
 
*An input method (Triggers, buttons, etc...)
 
*An input method (Triggers, buttons, etc...)
  
 
== Setup ==
 
== Setup ==
 
[[Image:HLA_hlvr_equip_for_flashlight.png|thumb|right|300px|Required flags for the player equip.]]
 
[[Image:HLA_hlvr_equip_for_flashlight.png|thumb|right|300px|Required flags for the player equip.]]
Create a room with an info_hlvr_equip_player. Set the properties:
+
Create a room with an [[info_hlvr_equip_player]]. Set the properties:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 31: Line 36:
  
  
Place a '''logic_playerproxy''' and name it ''playerproxy'' for this tutorial.
+
Place a '''[[logic_playerproxy]]''' and name it ''playerproxy'' for this tutorial.
  
Place a '''trigger_multiple''' where you would like your flashlight to be turned on or off.
+
Place a '''[[trigger_multiple]]''' where you would like your flashlight to be turned on or off.
  
  
Line 80: Line 85:
  
 
[[Image:HLA_flashlight_example_ingame.png|thumb|left|500px|The flashlight working in game!]]
 
[[Image:HLA_flashlight_example_ingame.png|thumb|left|500px|The flashlight working in game!]]
 
{{shortpagetitle}}
 

Latest revision as of 00:14, 29 September 2021

English Русский

Introduction

This tutorial will teach you how to use the flashlight in your map.

You will need:

Setup

Required flags for the player equip.

Create a room with an info_hlvr_equip_player. Set the properties:

Key Value
Equip on Map Start
Flashlight
Grabbity Gloves


Place a logic_playerproxy and name it playerproxy for this tutorial.

Place a trigger_multiple where you would like your flashlight to be turned on or off.


HLA flashlight required ents.png

Turning the Flashlight On/Off

To turn on the flashlight, send the input SetFlashlightEnable to the playerproxy.

My Output Target Entity Target Input Parameter Delay
OnTrigger playerproxy SetFlashlightEnable 0.00

To turn off the flashlight, send the input SetFlashlightDisable to the playerproxy.

My Output Target Entity Target Input Parameter Delay
OnTrigger playerproxy SetFlashlightDisable 0.00
Tip.png Tip: If it is possible to backtrack to an area with light, create 2 sets of triggers for the flashlight. One to turn it on when entering the dark area, and one to turn it off when returning to the light.


Finishing Up

Compile and run your map. When you walk through the triggers, your flashlight will turn on and off.

You can download the example map here. [[1]]

The flashlight working in game!