I have a similar problem, but instead of attach the spawned skeletal mesh to Player's pawn, I want to attach it to another skeletal mesh that is already attached to Pawn. That's like attach a skeletal mesh to player's weapon.
In other words what I want to do is:
Begin game & spawn player's pawn -> spawn weapon1 -> attach weapon1 to pawn's socket -> spawn weapon2 -> attach weapon2 to weapon1 socket
So far, I was able to spawn and attach successfully only Weapon1, while I've lot of problems with Weapon2.
That's what I tried:
class MYWeapon1 extends MYWeapon1Group;
var MYWeapon2 Weapon2;
var name Weapon_socket2;
/*When I try to use AttachWeaponTo function it returns me a type mismatching error in parameter 1 (I don't get why though), so I went to an AttachComponentToSocket instead*/
I could easily solve this problem attaching Weapon2 directly to player's pawn, but that's not what I want.
class MYWeapon2Group extends UDKWeapon;
var name Weapon2AttachmentSocketName;
function AttachComponentToSocket(ActorComponent Component, name SocketName)
local MYWeapon1 V;
V = MYWeapon1(Instigator.Weapon);
/*Here is where the problem is...
whatever of the following lines I use, it returns the error "Unrecognized AttachComponentToSocket in class MYWeapon2"*/
Begin Object Class=SkeletalMeshComponent Name=SkeletalMeshComponent1