AttachThingToThingEx(attach_thing, base_thing, flags);
flags: These are the Attach Flags to give to the attach_thing. Note that these flags are optional; the attach_thing will be given 0x4 anyway.
AttachThingToThingEx() was probably created to avoid a more complicated system using SetThingAttachFlags(). That method runs like this:
AttachThingToThing(attach_thing, base_thing); SetThingAttachFlags(attach_thing, attach_flags);