How to SetParent
I see all sorts of ugly stuff like setting the targetname of players to something temporarily.
It's really simple. PHP Code:
|
Re: Parenting things
According to the sdk docs, calling setparentattachment will teleport the entity tot he attachmentpoint, without need for setting origins, however, you can't do it on the same frame as setparent.
|
Re: Parenting things
Quote:
|
Re: How to SetParent
|
Re: How to SetParent
Ah so SetParentAttachment parents to an attachmentpoint, but from that point it follows the entity's origin, and MaintainOffset makes it follow the attachment point?
And in either case it teleports it to the attachment point? actually wat |
Re: How to SetParent
Quote:
|
Re: How to SetParent
You can do it with no delay, but you have to set up the origins manually if you do so..
Like if you make entity 1 and entity 2 and parent, both are at the origin, so it works because they have the same coordinates, then you can teleport it. However, if the entity is already created, and you do setparent and serparentattachmentmaintainoffset at the same time, it ma have undesired results. |
Re: How to SetParent
Quote:
Lesson learned: Never fully trust a (actually barely updated) wiki and do your own homework on occasion. It is also highly possible it is outdated information and this changed around the release of tf2 etc., or branches used by valve have specific changes there. |
Re: How to SetParent
Lots of violence in one thread. :c (#offtopic)
|
Re: How to SetParent
http://hittingthewall.paulglover.net.../11/oneup6.png
Because one-upmanship |
All times are GMT -4. The time now is 02:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.