View Single Post
Mitchell
~lick~
Join Date: Mar 2010
Old 02-17-2018 , 01:31   Re: SetParent that doesn't rotate prop?
Reply With Quote #7

here is a stock I created awhile ago for parenting and using Attachements:
Code:
public void parentEntity(int child, int parent, const char[] attachment) {
    SetVariantString("!activator");
    AcceptEntityInput(child, "SetParent", parent, child, 0);
    if(!StrEqual(attachment, "", false)) {
        SetVariantString(attachment);
        AcceptEntityInput(child, "SetParentAttachment", child, child, 0);
    }
}
to parent to an entity use: parentEntity(child, parent, "");
to parent to an entity with a specific attachement point use: parentEntity(child, parent, "forward");
Mitchell is offline