I finally managed to get the node to work, but there’s still work to do. To make it work I removed the typecasting from the function, and also removed all parameters but one.
SeqAct_BoneRemoval.uc
/**
* This kismet node is used to hide a bone
*/
class SeqAct_BoneRemoval extends SequenceAction;
var() Object SkelMesh;
var() name BoneName;
defaultproperties
{
ObjName="Bone Removal"
ObjCategory="Misc"
VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="Target",PropertyName=Targets)
}
SkeletalMeshComponent.uc
function OnBoneRemoval(SeqAct_BoneRemoval Action)
{
HideBoneByName('b_MF_Head',PBO_Term);
}
Unfortunately I cannot pass the bone name as a variable to the function, which means I cannot change the bone from the Kismet. I could make a function for each bone but that’s really bad design and it would only postpone the problem: if instead of hiding the bone I want to use BreakConstraint I’ll need to pass the function the hit vector, and that MUST be done through kismet. Any idea on how to proceed?