Entity/Use

From Garry's Mod
Jump to: navigation, search
 Entity:Use( )

Contents

Description

Activates the entity, as if a player pressed the Use key (Default E) on it.

Arguments

Player activator

The player who is using the entity

Arguments

Entity caller

This should be the same as activator.

This is supposed to be the entity that is acting as a proxy for the player (eg a button), but due to confusion over the difference between activator and caller, third party code may expect caller to be the activator and vice versa.

Therefore, the only safe thing to do is to set both arguments to be the player.

Arguments

number useType

The type of use to trigger. See USE_ Enums

Arguments

number integer

You can usually set this to 1.
Personal tools
Navigation