Garry's Mod Wiki

Garry's Mod Wiki

  Tool:SetObject( number id, Entity ent, Vector pos, PhysObj phys, number bone, Vector normal )

Description

Stores an Entity for later use in the tool.

The stored values can be retrieved by Tool:GetEnt, Tool:GetPos, Tool:GetLocalPos, Tool:GetPhys, Tool:GetBone and Tool:GetNormal

Arguments

1 number id
The id of the object to store.
2 Entity ent
The entity to store.
3 Vector pos
The position to store.
this position is in global space and is internally converted to local space relative to the object, so when you retrieve it later it will be corrected to the object's new position
4 PhysObj phys
The physics object to store.
5 number bone
The hit bone to store.
6 Vector normal
The hit normal to store.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...