In the extreme death, I am using this:
Code: Select all
DEM3 J 0 { A_SpawnItemEx("NJDemon3Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), NJDemon3ChunkFlags, 90);
A_SpawnItemEx("NJDemon3Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), NJDemon3ChunkFlags, 270);
A_SpawnItemEx("NJDemon3Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), NJDemon3ChunkFlags, 270);
A_SpawnItemEx("NJDemon3Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), NJDemon3ChunkFlags, 270);
A_SpawnItemEx("NJDemon3Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), NJDemon3ChunkFlags, 270);
}
Code: Select all
const NJDemon3ChunkFlags = SXF_TRANSFERTRANSLATION | SXF_ABSOLUTEVELOCITY;
All good. Just like the original demons, this results in a nice spray of body bits as the demon goes through its extreme death.
However, as soon as I add another flag to NJDemon3ChunkFlags, things stop working properly. Specifically, I wanted to add SXF_TRANSFERSCALE, but I've tried several other flags and had the same problem. The demon bits still spawn, but instead of being a spray of bits flying in several directions, they just spawn as a clump. (Perhaps this means that SXF_ABSOLUTEVELOCITY is being ignored?) any ideas?
It doesn't matter if I use the declared constant, or if I apply the flags directly in the state - same result.
Bonus question 1: Even if I only use the SXF_TRANSFERSCALE flag and no others, the chunks don't seem to scale. Is this not a suitable use case?
I can work around all this by just cloning the chunk actors and scaling them in their default state - but that can't take account of dynamic scaling - which I was going to add later.
Bonus question 2: in the A_SpawnItemEx code above (which I just copied and repurposed from *somewhere* (it's not the same as the default demon actors - so I don't know where it came from - maybe an older version?) after the word "random" there is a bit that says [DemonChunks]. What's the purpose of that? The code seems to work equally well with or without it.
