Garry's Mod Wiki

Entity:GetChildren

Description

Gets the children of the entity - that is, every entity whose move parent is this entity.

This function returns Entity:SetMoveParent children, NOT Entity:SetParent!

Entity:SetParent however also calls Entity:SetMoveParent.

This means that some entities in the returned list might have a NULL Entity:GetParent.

This also means that using this function on players will return their weapons on the client but not the server.

Returns

1 table
A list of movement children entities

Example

Example usage and output

-- ent is a prop_effect entity PrintTable( ent:GetChildren() )
Output: 1 = Entity [184][prop_dynamic]

Page Links


Special Pages


Wikis

?

Render Time: 21ms

Session 0
DB GetPage 3
Generate Html 2
SaveChanges 9
Render Body 0
Render Sidebar 5