Garry's Mod Wiki

Revision Difference

Enums/_USE#516138

<cat>enum</cat> <enumeration> <description> Enumerations used by <page>Entity:SetUseType</page>. Affects when <page>ENTITY:Use</page> is triggered. Not to be confused with <page>USE</page> used for <page>ENTITY:Use</page> and others. </description> <fields> <item key="CONTINUOUS_USE" value="0">Fire a [USE_ON](/gmod/Enums/USE) signal every tick as long as the player holds their use key and aims at the target.</item><item key="ONOFF_USE" value="1">Fires a [USE_ON](/gmod/Enums/USE) signal when starting to use an entity, and a [USE_OFF](/gmod/Enums/USE) signal when letting go.⤶ <item key="CONTINUOUS_USE" value="0">Fire a [USE_ON](/gmod/Enums/USE) signal every tick as long as the player holds their use key and aims at the target.</item>⤶ <item key="ONOFF_USE" value="1">Fires a [USE_ON](/gmod/Enums/USE) signal when starting to use an entity, and a [USE_OFF](/gmod/Enums/USE) signal when letting go.⤶ <warning>There is no guarantee to receive both ON and OFF signals. A signal will only be sent when pushing or letting go of the use key while actually aiming at the entity, so an ON signal might not be followed by an OFF signal if the player is aiming somewhere else when releasing the key, and similarly, an OFF signal may not be preceded by an ON signal if the player started aiming at the entity only after pressing the key. Therefore, this method of input is unreliable and should not be used.</warning></item><item key="DIRECTIONAL_USE" value="2">Like a wheel turning. &amp;lt;!-- couldn't get this to do anything, how does it work? --&amp;gt;</item><item key="SIMPLE_USE" value="3">Fire a [USE_ON](/gmod/Enums/USE) signal only once when player presses their use key while aiming at the target.</item>⤶ Therefore, this method of input is unreliable and should not be used.</warning></item>⤶ <item key="DIRECTIONAL_USE" value="2">Like a wheel turning. &amp;lt;!-- couldn't get this to do anything, how does it work? --&amp;gt;</item>⤶ <item key="SIMPLE_USE" value="3">Fire a [USE_ON](/gmod/Enums/USE) signal only once when player presses their use key while aiming at the target.</item>⤶ </fields> </enumeration>