How do i determaning if a shape is destroyed, with script?
I've been trying to figer this one out for a while.
I need flipflops to only flip if they have been destroyed.
staticShape.cs
thanks in advance.
I need flipflops to only flip if they have been destroyed.
staticShape.cs
datablock StaticShapeData(FlipFlop) : StaticShapeDamageProfile
{
...
};
function FlipFlop::onCollision(%data,%obj,%col)
{
if (%col.getDataBlock().className $= Armor && %col.getState() !$= "Dead")
{
//I need to test whther or not the flipflop is destroyed
//if(isDestroyed()) //this line dousen't work
%data.playerTouch(%obj, %col);
}
}
thanks in advance.
Comments
Why you'd want to check if an invulnerable object is destroyed however is beyond me.
and tks for the code.