Okay, I didn't realize it, but Sector_Set3DFloor specials get erased, after the level loads. The good news is that it's actually much easier to do what you're trying to do than I originally thought. Try this:
- Code: Select all • Expand view
override void Material3DDestroyed(WorldEvent e)
{
// I was wrong about how to calculate the pos before
// z should be in the center of the control sector
Vector3 pos;
pos.z = e.damageSector.floorPlane.ZAtPoint(e.damageSector.centerSpot);
pos.z += e.damageSector.ceilingPlane.ZAtPoint(e.damageSector.centerSpot);
pos.z /= 2
Super.Material3DDestroyed(e); // calls MoveFloor/MoveCeiling
for (int i = 0; i < e.damageSector.GetAttachedCount(); ++i)
{
Sector s = e.damageSector.GetAttached(i);
// x & y should be in the center of the attached sector
pos.xy = s.centerSpot;
EjectDebris(8, "WOODGIB", pos, 32); //Alternate debris, use this WoodenBit
}
}