Garry's Mod Wiki

History for ENTITY:Touch

Revision Difference


<function name="Touch" parent="ENTITY" type="hook"> <ishook>yes</ishook> <description> Called every tick for every entity being "touched". See also <page>ENTITY:StartTouch</page> and <page>ENTITY:EndTouch</page>. <note>For physics enabled entities, this hook will **not** be ran while the entity's physics is asleep. See <page>PhysObj:Wake</page>.</note> </description> <realm>Server</realm> <predicted>No</predicted> <args> <arg name="entity" type="Entity">The entity that touched it.</arg> </args> </function> <example> <code> function ENTITY:Touch(entity) self:EmitSound("ambient/explosions/explode_" .. math.random(1, 9) .. ".wav") self:Remove() end </code> </example></example>

Special Pages



Render Time: 70ms

DB GetPage 55
Get RevNew 1
Get RevOld 5
Render Body 0
Render Sidebar 7