Garry's Mod Wiki

Tool:SetObject

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.

Page Links


Special Pages


Wikis

?

Render Time: 51ms

DB GetPage 5
Generate Html 21
SaveChanges (1) 11
Render Body 0
Render Sidebar 12