Garry's Mod Wiki

Entity:SetMoveParent

Entity:SetMoveParent( Entity Parent )

Description

Sets the Movement Parent of an entity to another entity.

Similar to Entity:SetParent, except the object's coordinates are not translated automatically before parenting.

Arguments

1 Entity Parent
The entity to change this entity's Movement Parent to.

Example

Sets the Movement Entity of a new entity to Player 1.

local hat = ents.Create("prop_physics") //Position and angles are relative to our future parent. hat:SetPos(Vector(0,0,10)) hat:SetAngles(Angle(0,90,0)) hat:SetMoveParent(Entity(1)) hat:Spawn()

Page Links


Special Pages


Wikis

?

Render Time: 87ms

DB GetPage 55
Generate Html 8
SaveChanges (1) 10
Render Body 0
Render Sidebar 11