Re: Making limbs gib upon gibbing of the body?
CaveCricket48 wrote:
Something like
Code:
function Update(self)
if self.RootID == self.ID then
self:GibThis();
end
end
.RootID is the ID of the root MO. So, the RootID of a limb is the torso ID. When the limb is detached/the torso is destroyed, the RootID of the limb will match the limb's ID, since it's no longer connected.
Hello! Thanks for the help.
I see! So i applied it both to the body and the limbs, on different occasions. Though none of them would work.
If applied to legs and arms i get this error in console.
And once added to the body the Actor instaGibs upon spawning.
Code:
ERROR: [string "Legs.Obj00163 = ToLeg(MovableMan.ScriptedEn..."]:1: attempt to call global 'ToLeg' (a nil value)
ERROR: [string "Legs.Obj00164 = ToLeg(MovableMan.ScriptedEn..."]:1: attempt to call global 'ToLeg' (a nil value)
ERROR: [string "Arms.Obj00165 = ToArm(MovableMan.ScriptedEn..."]:1: attempt to call global 'ToArm' (a nil value)
ERROR: [string "Arms.Obj00166 = ToArm(MovableMan.ScriptedEn..."]:1: attempt to call global 'ToArm' (a nil value)
CaveCricket48 wrote:
When the limb is detached/the torso is destroyed
I think we misunderstood eachother, I meant as in destroying the arms and legs when the torso is destroyed.
They are big so they look weird when they just fall off when the Actor dies.
Thank You.