Entity.SetUseType

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetUseType( Integer usetype )
Description:
Sets the entity's usetype. It takes an integer that corresponds to a usetype enumeration.
Returns: nil
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetUseType]Entity.SetUseType [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMakes the ENT.Use hook only get called once at every use.
Used onNewerServer.png
Code
Entity:SetUseType(SIMPLE_USE)
OutputN/A


Additional Notes

These are the states that a button can be:

SHARED | 0000000000000000 | 00000000000000000 | CONTINUOUS_USE - Default, like a charger.
SHARED | 0000000000000001 | 00000000000000001 | ONOFF_USE - Toggling true/false use.
SHARED | 0000000000000002 | 00000000000000010 | DIRECTIONAL_USE - Like a wheel turning.
SHARED | 0000000000000003 | 00000000000000011 | SIMPLE_USE - Single press.

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox