I'm experimenting with altering specimen sizes, and have realised that the ragdoll spawned when the specimen dies does not scale at all. It seems the scale of the bones is scaled but not the actual offsets themselves, for example:
As of yet I have no idea what is causing this, as apparently the ragdoll's scale variable (KScale) is supposed to automatically be kept in sync with the actor's DrawScale variable. Although, even when I provide my own KParams object with a modified KScale it doesn't seem to change anything.
Anyway, here's the code:
Mutator:
SmallClot:
If you want to see that the ragdoll size remains exactly the same, add this to the specimen code to restore the original DrawScale when it dies:
Any ideas?
As of yet I have no idea what is causing this, as apparently the ragdoll's scale variable (KScale) is supposed to automatically be kept in sync with the actor's DrawScale variable. Although, even when I provide my own KParams object with a modified KScale it doesn't seem to change anything.
Anyway, here's the code:
Mutator:
Code:
class SmallClotMut extends Mutator;
function PostBeginPlay()
{
SetTimer(0.1, false);
}
function Timer()
{
local KFGameType KF;
local byte i;
KF = KFGameType(Level.Game);
KF.InitSquads.Length = 1;
KF.InitSquads[0].MSquad.Length = 8;
for( i=0; i<8; i++ )
KF.InitSquads[0].MSquad[i] = class'SmallClot';
}
defaultproperties
{
GroupName="KFSmallClotMut"
FriendlyName="Small Clots Mutator"
Description="Replaces clots with smaller version."
}
SmallClot:
Code:
class SmallClot extends ZombieClot;
defaultproperties
{
DrawScale=0.5
Prepivot=(Z=-1.1)
CollisionHeight=19.8
CollisionRadius=11.7
ColOffset=(Z=21.6)
ColRadius=11.25
ColHeight=2.25
HeadScale=0.5
SeveredHeadAttachScale=0.355
SeveredLegAttachScale=0.355
SeveredArmAttachScale=0.355
GroundSpeed=10
MeleeRange=11.7
MeleeDamage=0
}
If you want to see that the ragdoll size remains exactly the same, add this to the specimen code to restore the original DrawScale when it dies:
Code:
simulated function PlayDyingAnimation(class<DamageType> DamageType, vector HitLoc)
{
SetDrawScale(1.1);
Super.PlayDyingAnimation(DamageType, HitLoc);
}
Any ideas?